[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

[Git][debian-mate-team/mate-control-center][master] debian/patches: Rename 2001_gnome-color-scheme.patch to...



Title: GitLab

Martin Wimpress pushed to branch master at Debian and Ubuntu MATE Packaging Team / mate-control-center

Commits:

2 changed files:

Changes:

  • debian/patches/2001_gnome-color-scheme.patchdebian/patches/2001_appearance_support.patch
    1 1
     diff --git a/capplets/appearance/appearance-support.c b/capplets/appearance/appearance-support.c
    
    2
    -index 7c339e5..b40419a 100644
    
    2
    +index 7c339e5..1f2917b 100644
    
    3 3
     --- a/capplets/appearance/appearance-support.c
    
    4 4
     +++ b/capplets/appearance/appearance-support.c
    
    5
    -@@ -100,19 +100,41 @@ metacity_theme_apply(const gchar *theme, const gchar *font)
    
    5
    +@@ -100,19 +100,108 @@ metacity_theme_apply(const gchar *theme, const gchar *font)
    
    6 6
          }
    
    7 7
      }
    
    8 8
      
    
    9
    ++/* Change the Plank theme if a Yaru theme is selected */
    
    9 10
     +static void
    
    10
    -+color_scheme_apply(const gchar *theme)
    
    11
    ++plank_theme_apply(const gchar *theme, const gchar *layout)
    
    11 12
     +{
    
    12
    -+    if (is_program_in_path ("gsettings"))
    
    13
    ++    gchar *dconf_cmd = NULL;
    
    14
    ++
    
    15
    ++    if (g_str_has_prefix (theme, "Yaru"))
    
    13 16
     +    {
    
    14
    -+        gchar *gsettings_cmd = NULL;
    
    17
    ++        if (g_str_has_prefix (layout, "mutiny"))
    
    18
    ++        {
    
    19
    ++            if (g_str_has_suffix (theme, "-dark"))
    
    20
    ++            {
    
    21
    ++                dconf_cmd = g_strdup_printf("dconf write /net/launchpad/plank/docks/dock1/theme \"'Mutiny-dark'\"");
    
    22
    ++            } else
    
    23
    ++            {
    
    24
    ++                dconf_cmd = g_strdup_printf("dconf write /net/launchpad/plank/docks/dock1/theme \"'Mutiny-light'\"");
    
    25
    ++            }
    
    26
    ++        }
    
    27
    ++        else
    
    28
    ++        {
    
    29
    ++            if (g_str_has_suffix (theme, "-dark"))
    
    30
    ++            {
    
    31
    ++                dconf_cmd = g_strdup_printf("dconf write /net/launchpad/plank/docks/dock1/theme \"'Yaru-dark'\"");
    
    32
    ++            } else
    
    33
    ++            {
    
    34
    ++                dconf_cmd = g_strdup_printf("dconf write /net/launchpad/plank/docks/dock1/theme \"'Yaru-light'\"");
    
    35
    ++            }
    
    36
    ++        }
    
    37
    ++        g_spawn_command_line_async (dconf_cmd, NULL);
    
    38
    ++        g_free (dconf_cmd);
    
    39
    ++    }
    
    40
    ++}
    
    41
    ++
    
    42
    ++/* Change the GtkSourceView Style for Pluma if a Yaru theme is selected */
    
    43
    ++static void
    
    44
    ++pluma_theme_apply(const gchar *theme)
    
    45
    ++{
    
    46
    ++    gchar *gsettings_cmd = NULL;
    
    15 47
     +
    
    16
    -+        /* Make libhandy apps dark/light */
    
    48
    ++    if (g_str_has_prefix (theme, "Yaru"))
    
    49
    ++    {
    
    17 50
     +        if (g_str_has_suffix (theme, "-dark"))
    
    18 51
     +        {
    
    19
    -+            gsettings_cmd = g_strdup_printf("gsettings set org.gnome.desktop.interface color-scheme prefer-dark");
    
    52
    ++            gsettings_cmd = g_strdup_printf("gsettings set org.mate.pluma color-scheme 'Yaru-dark'");
    
    20 53
     +        } else
    
    21 54
     +        {
    
    22
    -+            gsettings_cmd = g_strdup_printf("gsettings set org.gnome.desktop.interface color-scheme default");
    
    55
    ++            gsettings_cmd = g_strdup_printf("gsettings set org.mate.pluma color-scheme 'Yaru'");
    
    23 56
     +        }
    
    24 57
     +        g_spawn_command_line_async (gsettings_cmd, NULL);
    
    25 58
     +        g_free (gsettings_cmd);
    
    26 59
     +    }
    
    27 60
     +}
    
    61
    ++
    
    62
    ++/* If the theme is "-dark", set the GNOME 42 dark preference */
    
    63
    ++static void
    
    64
    ++color_scheme_apply(const gchar *theme)
    
    65
    ++{
    
    66
    ++    gchar *gsettings_cmd = NULL;
    
    67
    ++
    
    68
    ++    if (g_str_has_suffix (theme, "-dark"))
    
    69
    ++    {
    
    70
    ++        gsettings_cmd = g_strdup_printf("gsettings set org.gnome.desktop.interface color-scheme prefer-dark");
    
    71
    ++    } else
    
    72
    ++    {
    
    73
    ++        gsettings_cmd = g_strdup_printf("gsettings set org.gnome.desktop.interface color-scheme default");
    
    74
    ++    }
    
    75
    ++    g_spawn_command_line_async (gsettings_cmd, NULL);
    
    76
    ++    g_free (gsettings_cmd);
    
    77
    ++}
    
    28 78
     +
    
    29 79
      static void
    
    30 80
      marco_theme_changed(GSettings *settings, gchar *key, AppearanceData* data)
    
    31 81
      {
    
    32 82
          gchar *theme = NULL;
    
    33 83
          gchar *font = NULL;
    
    84
    ++    gchar *layout = NULL;
    
    85
    ++    GSettings * panel_settings;
    
    34 86
     +
    
    35 87
     +    theme = g_settings_get_string (settings, MARCO_THEME_KEY);
    
    36 88
     +    font = g_settings_get_string (settings, WINDOW_TITLE_FONT_KEY);
    
    37
    -+    color_scheme_apply (theme);
    
    89
    ++
    
    90
    ++    panel_settings = g_settings_new ("org.mate.panel");
    
    91
    ++    layout = g_settings_get_string (panel_settings, "default-layout");
    
    92
    ++
    
    93
    ++    if (is_program_in_path ("gsettings"))
    
    94
    ++    {
    
    95
    ++        color_scheme_apply (theme);
    
    96
    ++        pluma_theme_apply (theme);
    
    97
    ++    }
    
    98
    ++
    
    99
    ++    if (is_program_in_path ("dconf"))
    
    100
    ++    {
    
    101
    ++        plank_theme_apply (theme, layout);
    
    102
    ++    }
    
    103
    ++
    
    38 104
          if (metacity_is_running ())
    
    39 105
          {
    
    40 106
     -        theme = g_settings_get_string (settings, MARCO_THEME_KEY);
    
    ... ... @@ -45,10 +111,11 @@ index 7c339e5..b40419a 100644
    45 111
          }
    
    46 112
     +    g_free (theme);
    
    47 113
     +    g_free (font);
    
    114
    ++    g_free (layout);
    
    48 115
      }
    
    49 116
      
    
    50 117
      void
    
    51
    -@@ -126,8 +148,7 @@ support_init(AppearanceData* data)
    
    118
    +@@ -126,8 +215,7 @@ support_init(AppearanceData* data)
    
    52 119
          g_signal_connect (data->marco_settings, "changed::" WINDOW_TITLE_FONT_KEY,
    
    53 120
                            G_CALLBACK (marco_theme_changed), data);
    
    54 121
          /* apply theme at start */
    

  • debian/patches/series
    1 1
     2000_make_glibc264_compat.patch
    
    2
    -2001_gnome-color-scheme.patch
    2
    +2001_appearance_support.patch


  • Reply to: