Skip to content

Commit

Permalink
fix indentation
Browse files Browse the repository at this point in the history
  • Loading branch information
schnittchen committed Aug 27, 2014
1 parent bd40776 commit fa6469f
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 14 deletions.
2 changes: 1 addition & 1 deletion src/guake
Original file line number Diff line number Diff line change
Expand Up @@ -1109,7 +1109,7 @@ class Guake(SimpleGladeApp):
dest_screen = screen.get_monitor_at_point(x, y)

# If Guake is configured to use a screen that is not currently attached,
# default to 'primary display' option.
# default to 'primary display' option. WRONG
n_screens = screen.get_n_monitors()
if dest_screen > n_screens - 1:
self.client.set_bool(KEY('/general/mouse_display'), False)
Expand Down
26 changes: 13 additions & 13 deletions src/prefs.py
Original file line number Diff line number Diff line change
Expand Up @@ -274,10 +274,10 @@ def on_display_n_changed(self, combo):
first_item_path = model.get_path(model.get_iter_first())

if model.get_path(i) == first_item_path:
val_int = ALWAYS_ON_PRIMARY
val_int = ALWAYS_ON_PRIMARY
else:
val = model.get_value(i, 0)
val_int = int(val.split()[0]) # extracts 1 from '1' or from '1 (primary)'
val = model.get_value(i, 0)
val_int = int(val.split()[0]) # extracts 1 from '1' or from '1 (primary)'
self.client.set_int(KEY('/general/display_n'), val_int)

def on_window_height_value_changed(self, hscale):
Expand Down Expand Up @@ -674,17 +674,17 @@ def load_configs(self):
self.client.set_int(KEY('/general/display_n'), dest_screen)

if dest_screen == ALWAYS_ON_PRIMARY:
first_item = combo.get_model().get_iter_first()
combo.set_active_iter(first_item)
first_item = combo.get_model().get_iter_first()
combo.set_active_iter(first_item)
else:
seen_first = False # first item "always on primary" is special
for i in combo.get_model():
if seen_first:
i_int = int(i[0].split()[0]) # extracts 1 from '1' or from '1 (primary)'
if i_int == dest_screen:
combo.set_active_iter(i.iter)
else:
seen_first = True
seen_first = False # first item "always on primary" is special
for i in combo.get_model():
if seen_first:
i_int = int(i[0].split()[0]) # extracts 1 from '1' or from '1 (primary)'
if i_int == dest_screen:
combo.set_active_iter(i.iter)
else:
seen_first = True

# use display where the mouse is currently
value = self.client.get_bool(KEY('/general/mouse_display'))
Expand Down

0 comments on commit fa6469f

Please sign in to comment.