Skip to content

Commit

Permalink
Use same theme as Marco
Browse files Browse the repository at this point in the history
  • Loading branch information
gabrielfin authored and flexiondotorg committed Jun 18, 2019
1 parent cee8828 commit 6506723
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 51 deletions.
5 changes: 0 additions & 5 deletions data/org.mate.window-applets.gschema.xml
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,6 @@
</description>
</key>

<key name="theme" type="s">
<default>'Black'</default>
<summary>Buttons theme</summary>
</key>

<key name="spacing" type="i">
<default>8</default>
<summary>Spacing betwene buttons</summary>
Expand Down
42 changes: 0 additions & 42 deletions window-buttons-applet/dialog.ui
Original file line number Diff line number Diff line change
Expand Up @@ -149,48 +149,6 @@
<property name="position">1</property>
</packing>
</child>
<child>
<object class="GtkBox">
<property name="visible">True</property>
<property name="can_focus">False</property>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="halign">start</property>
<property name="label" translatable="yes">Theme :</property>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="padding">2</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkEntry" id="theme">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="halign">end</property>
<property name="valign">center</property>
<property name="width_chars">40</property>
<property name="shadow_type">none</property>
<property name="input_hints">GTK_INPUT_HINT_NO_SPELLCHECK | GTK_INPUT_HINT_LOWERCASE | GTK_INPUT_HINT_NONE</property>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="padding">2</property>
<property name="position">1</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">2</property>
</packing>
</child>
<child>
<object class="GtkBox">
<property name="visible">True</property>
Expand Down
6 changes: 2 additions & 4 deletions window-buttons-applet/window-buttons-applet.vala
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ namespace WindowButtonsApplet{
this.change_theme();
this.change_spacing();

this.gsettings.changed["theme"].connect(this.change_theme);
this.marco_gsettings.changed["theme"].connect(this.change_theme);
this.gsettings.changed["spacing"].connect(this.change_spacing);
this.marco_gsettings.changed["button_layout"].connect(this.change_layout);

Expand Down Expand Up @@ -148,7 +148,7 @@ namespace WindowButtonsApplet{
}

public void change_theme(){
string theme_name = gsettings.get_string("theme");
string theme_name = marco_gsettings.get_string("theme");

WindowButtonsTheme theme = new WindowButtonsTheme(theme_name);

Expand Down Expand Up @@ -270,14 +270,12 @@ namespace WindowButtonsApplet{

widget_container.gsettings.bind("use-marco-layout",builder.get_object("use-marco-layout"),"state",SettingsBindFlags.DEFAULT);
widget_container.gsettings.bind("buttons-layout",builder.get_object("layout"),"text",SettingsBindFlags.DEFAULT);
widget_container.gsettings.bind("theme",builder.get_object("theme"),"text",SettingsBindFlags.DEFAULT);
widget_container.gsettings.bind("spacing",builder.get_object("spacing"),"value",SettingsBindFlags.DEFAULT);
widget_container.gsettings.bind("padding",builder.get_object("padding"),"value",SettingsBindFlags.DEFAULT);
widget_container.gsettings.bind("behaviour",builder.get_object("behaviour"),"active_id",SettingsBindFlags.DEFAULT);

widget_container.gsettings.changed["use-marco-layout"].connect(widget_container.change_layout);
widget_container.gsettings.changed["buttons-layout"].connect(widget_container.change_layout);
widget_container.gsettings.changed["theme"].connect(widget_container.change_theme);
widget_container.gsettings.changed["spacing"].connect( (key) => { widget_container.change_size(applet.get_size()); } );
widget_container.gsettings.changed["padding"].connect( (key) => { widget_container.change_size(applet.get_size()); } );
widget_container.gsettings.changed["behaviour"].connect( (key) => { widget_container.reload(); } );
Expand Down

0 comments on commit 6506723

Please sign in to comment.