Skip to content

Commit

Permalink
Revert Guake#357 "Adding horizontal size and align to preferences"
Browse files Browse the repository at this point in the history
This reverts commit a97532b.
  • Loading branch information
gsemet committed Aug 11, 2014
1 parent f60deb6 commit 00408c3
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 165 deletions.
135 changes: 1 addition & 134 deletions data/prefs.glade
Original file line number Diff line number Diff line change
Expand Up @@ -674,7 +674,7 @@
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="ypad">6</property>
<property name="label" translatable="yes">&lt;b&gt;Main Window Height&lt;/b&gt;</property>
<property name="label" translatable="yes">&lt;b&gt;Main Window height&lt;/b&gt;</property>
<property name="use_markup">True</property>
</widget>
<packing>
Expand All @@ -688,139 +688,6 @@
<property name="position">3</property>
</packing>
</child>
<child>
<widget class="GtkFrame" id="frame2">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label_xalign">0</property>
<property name="shadow_type">none</property>
<child>
<widget class="GtkAlignment" id="alignment12">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="left_padding">12</property>
<child>
<widget class="GtkHScale" id="window_width">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="update_policy">discontinuous</property>
<property name="adjustment">50 10 110 10 10 10</property>
<property name="digits">0</property>
<property name="draw_value">False</property>
<property name="value_pos">right</property>
<signal name="value_changed" handler="on_window_width_value_changed" swapped="no"/>
</widget>
</child>
</widget>
</child>
<child>
<widget class="GtkLabel" id="label33">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="ypad">6</property>
<property name="label" translatable="yes">&lt;b&gt;Main Window Width&lt;/b&gt;</property>
<property name="use_markup">True</property>
</widget>
<packing>
<property name="type">label_item</property>
</packing>
</child>
</widget>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">4</property>
</packing>
</child>
<child>
<widget class="GtkFrame" id="frame13">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label_xalign">0</property>
<property name="shadow_type">none</property>
<child>
<widget class="GtkAlignment" id="alignment15">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="left_padding">12</property>
<child>
<widget class="GtkHButtonBox" id="hbuttonbox2">
<property name="visible">True</property>
<property name="can_focus">False</property>
<child>
<widget class="GtkRadioButton" id="radiobutton_align_left">
<property name="label" translatable="yes">Left</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
<property name="use_action_appearance">False</property>
<property name="draw_indicator">True</property>
<signal name="toggled" handler="on_window_halign_value_changed" swapped="no"/>
</widget>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">0</property>
</packing>
</child>
<child>
<widget class="GtkRadioButton" id="radiobutton_align_center">
<property name="label" translatable="yes">Center</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
<property name="use_action_appearance">False</property>
<property name="active">True</property>
<property name="draw_indicator">True</property>
<property name="group">radiobutton_align_left</property>
<signal name="toggled" handler="on_window_halign_value_changed" swapped="no"/>
</widget>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">1</property>
</packing>
</child>
<child>
<widget class="GtkRadioButton" id="radiobutton_align_right">
<property name="label" translatable="yes">Right</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
<property name="use_action_appearance">False</property>
<property name="draw_indicator">True</property>
<property name="group">radiobutton_align_left</property>
<signal name="toggled" handler="on_window_halign_value_changed" swapped="no"/>
</widget>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">2</property>
</packing>
</child>
</widget>
</child>
</widget>
</child>
<child>
<widget class="GtkLabel" id="label34">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="ypad">6</property>
<property name="label" translatable="yes">&lt;b&gt;Main Window Horizontal Alignment&lt;/b&gt;</property>
<property name="use_markup">True</property>
</widget>
<packing>
<property name="type">label_item</property>
</packing>
</child>
</widget>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">5</property>
</packing>
</child>
</widget>
</child>
<child>
Expand Down
31 changes: 0 additions & 31 deletions src/prefs.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,6 @@
from guake.common import gladefile
from guake.common import hexify_color
from guake.common import pixmapfile
from guake.globals import ALIGN_CENTER
from guake.globals import ALIGN_LEFT
from guake.globals import ALIGN_RIGHT
from guake.globals import GCONF_PATH
from guake.globals import KEY
from guake.globals import LOCALE_DIR
Expand Down Expand Up @@ -273,23 +270,6 @@ def on_window_height_value_changed(self, hscale):
val = hscale.get_value()
self.client.set_int(KEY('/general/window_height'), int(val))

def on_window_width_value_changed(self, wscale):
"""Changes the value of window_width in gconf
"""
val = wscale.get_value()
self.client.set_int(KEY('/general/window_width'), int(val))

def on_window_halign_value_changed(self, halign_button):
"""Changes the value of window_halignment in gconf
"""
if halign_button.get_active():
which_align = {
'radiobutton_align_left': ALIGN_LEFT,
'radiobutton_align_right': ALIGN_RIGHT,
'radiobutton_align_center': ALIGN_CENTER
}
self.client.set_int(KEY('/general/window_halignment'), which_align[halign_button.get_name()])

# scrolling tab

def on_use_scrollbar_toggled(self, chk):
Expand Down Expand Up @@ -605,17 +585,6 @@ def load_configs(self):
value = self.client.get_int(KEY('/general/window_height'))
self.get_widget('window_height').set_value(value)

value = self.client.get_int(KEY('/general/window_width'))
self.get_widget('window_width').set_value(value)

value = self.client.get_int(KEY('/general/window_halignment'))
which_button = {
ALIGN_RIGHT: 'radiobutton_align_right',
ALIGN_LEFT: 'radiobutton_align_left',
ALIGN_CENTER: 'radiobutton_align_center'
}
self.get_widget(which_button[value]).set_active(True)

value = self.client.get_bool(KEY('/general/open_tab_cwd'))
self.get_widget('open_tab_cwd').set_active(value)

Expand Down

0 comments on commit 00408c3

Please sign in to comment.