[Xfce4-commits] <design:master> Make variable names shorter.
Jannis Pohlmann
noreply at xfce.org
Tue May 31 23:12:01 CEST 2011
Updating branch refs/heads/master
to 74e117e7e4b1c8fda45c77cb7bd310b17cec2b8b (commit)
from c728aa617e446866d1bfb93759c68df6e6ea3cb3 (commit)
commit 74e117e7e4b1c8fda45c77cb7bd310b17cec2b8b
Author: Jannis Pohlmann <jannis at xfce.org>
Date: Tue May 31 23:11:04 2011 +0200
Make variable names shorter.
.../demo-code/custom-view/shortcut-row.vala | 48 ++++++++++----------
1 files changed, 24 insertions(+), 24 deletions(-)
diff --git a/thunar/shortcuts-pane/demo-code/custom-view/shortcut-row.vala b/thunar/shortcuts-pane/demo-code/custom-view/shortcut-row.vala
index 3e0a2f2..6826133 100644
--- a/thunar/shortcuts-pane/demo-code/custom-view/shortcut-row.vala
+++ b/thunar/shortcuts-pane/demo-code/custom-view/shortcut-row.vala
@@ -28,8 +28,8 @@ public class ShortcutRow : EventBox {
public bool connected { get; set; }
private Image disconnect_icon { get; set; }
- private Image disconnect_cancel_icon { get; set; }
- private Button disconnect_button { get; set; }
+ private Image cancel_icon { get; set; }
+ private Button button { get; set; }
private Spinner spinner { get; set; }
public ShortcutRow (string title, string icon_name, bool connected) {
@@ -63,32 +63,32 @@ public class ShortcutRow : EventBox {
disconnect_icon.set_pixel_size (16);
disconnect_icon.ref ();
- disconnect_cancel_icon = new Image.from_stock (Stock.CANCEL, IconSize.MENU);
- disconnect_cancel_icon.set_pixel_size (16);
- disconnect_cancel_icon.ref ();
+ cancel_icon = new Image.from_stock (Stock.CANCEL, IconSize.MENU);
+ cancel_icon.set_pixel_size (16);
+ cancel_icon.ref ();
- disconnect_button = new Button ();
- disconnect_button.set_relief (ReliefStyle.NONE);
- disconnect_button.set_image (disconnect_icon);
- disconnect_button.set_no_show_all (true);
- box.pack_start (disconnect_button, false, true, 0);
+ button = new Button ();
+ button.set_relief (ReliefStyle.NONE);
+ button.set_image (disconnect_icon);
+ button.set_no_show_all (true);
+ box.pack_start (button, false, true, 0);
- disconnect_button.enter.connect (() => {
+ button.enter.connect (() => {
if (spinner.active) {
- disconnect_button.set_image (disconnect_cancel_icon);
+ button.set_image (cancel_icon);
}
});
- disconnect_button.leave.connect (() => {
+ button.leave.connect (() => {
if (spinner.active) {
- disconnect_button.set_image (spinner);
+ button.set_image (spinner);
}
});
- disconnect_button.clicked.connect (connect_device);
+ button.clicked.connect (connect_device);
if (connected) {
- disconnect_button.show ();
+ button.show ();
}
spinner = new Spinner ();
@@ -101,7 +101,7 @@ public class ShortcutRow : EventBox {
~ShortcutRow () {
disconnect_icon.unref ();
- disconnect_cancel_icon.unref ();
+ cancel_icon.unref ();
spinner.unref ();
}
@@ -110,9 +110,9 @@ public class ShortcutRow : EventBox {
get_current_event_state (out state);
if ((state & Gdk.ModifierType.BUTTON1_MASK) != 0) {
- disconnect_button.set_image (disconnect_cancel_icon);
+ button.set_image (cancel_icon);
} else {
- disconnect_button.set_image (spinner);
+ button.set_image (spinner);
}
spinner.start ();
@@ -122,7 +122,7 @@ public class ShortcutRow : EventBox {
public bool stop_spinner () {
spinner.stop ();
- disconnect_button.set_image (disconnect_icon);
+ button.set_image (disconnect_icon);
return false;
}
@@ -166,14 +166,14 @@ public class ShortcutRow : EventBox {
case DirectionType.TAB_BACKWARD:
return false;
case DirectionType.UP:
- if (is_focus || disconnect_button.is_focus) {
+ if (is_focus || button.is_focus) {
return false;
} else {
grab_focus ();
return true;
}
case DirectionType.DOWN:
- if (is_focus || disconnect_button.is_focus) {
+ if (is_focus || button.is_focus) {
return false;
} else {
grab_focus ();
@@ -183,8 +183,8 @@ public class ShortcutRow : EventBox {
grab_focus ();
return true;
case DirectionType.RIGHT:
- if (disconnect_button.visible)
- disconnect_button.grab_focus ();
+ if (button.visible)
+ button.grab_focus ();
return true;
default:
return false;
More information about the Xfce4-commits
mailing list