GtkSizeGroup *group;
gchar *s;
gint pos, i;
+ gboolean opp;
mapping = TRUE;
g_free(s);
gtk_option_menu_set_history(GTK_OPTION_MENU(w), pos);
+ w = get_widget("fixed_x_popup");
+ s = tree_get_string("resize/popupFixedPosition/x", "0");
+ opp = s[0] == '-';
+ if (s[0] == '-' || s[0] == '+') ++s;
+ if (!strcasecmp(s, "Center")) pos = EDGE_CENTER;
+ else if (opp) pos = EDGE_RIGHT;
+ else pos = EDGE_LEFT;
+ g_free(s);
+ gtk_option_menu_set_history(GTK_OPTION_MENU(w), pos);
+
w = get_widget("fixed_x_pos");
- gtk_spin_button_set_value(GTK_SPIN_BUTTON(w),
- tree_get_int("resize/popupFixedPosition/x", 0));
+ gtk_spin_button_set_value(GTK_SPIN_BUTTON(w), MAX(atoi(s), 0));
+
+ w = get_widget("fixed_y_popup");
+ s = tree_get_string("resize/popupFixedPosition/y", "0");
+ opp = s[0] == '-';
+ if (!strcasecmp(s, "Center")) pos = EDGE_CENTER;
+ else if (opp) pos = EDGE_RIGHT;
+ else pos = EDGE_LEFT;
+ g_free(s);
+ gtk_option_menu_set_history(GTK_OPTION_MENU(w), pos);
w = get_widget("fixed_y_pos");
- gtk_spin_button_set_value(GTK_SPIN_BUTTON(w),
- tree_get_int("resize/popupFixedPosition/y", 0));
+ gtk_spin_button_set_value(GTK_SPIN_BUTTON(w), MAX(atoi(s), 0));
i = tree_get_int("mouse/screenEdgeWarpTime", 400);
enable_stuff();
}
-void on_fixed_y_position_left_activate(GtkMenuItem *w, gpointer data)
+void on_fixed_y_position_top_activate(GtkMenuItem *w, gpointer data)
{
if (mapping) return;
enable_stuff();
}
-void on_fixed_y_position_right_activate(GtkMenuItem *w, gpointer data)
+void on_fixed_y_position_bottom_activate(GtkMenuItem *w, gpointer data)
{
if (mapping) return;
<child>
<widget class="GtkMenuItem" id="menuitem6">
<property name="visible">True</property>
- <property name="label" translatable="yes">From left edge</property>
+ <property name="label" translatable="yes">From top edge</property>
<property name="use_underline">True</property>
- <signal name="activate" handler="on_fixed_y_position_left_activate" last_modification_time="Sat, 12 Jan 2008 17:54:45 GMT"/>
+ <signal name="activate" handler="on_fixed_y_position_top_activate" last_modification_time="Sun, 10 Feb 2008 23:17:10 GMT"/>
</widget>
</child>
<child>
<widget class="GtkMenuItem" id="menuitem7">
<property name="visible">True</property>
- <property name="label" translatable="yes">From right edge</property>
+ <property name="label" translatable="yes">From bottom edge</property>
<property name="use_underline">True</property>
- <signal name="activate" handler="on_fixed_y_position_right_activate" last_modification_time="Sat, 12 Jan 2008 17:54:45 GMT"/>
+ <signal name="activate" handler="on_fixed_y_position_bottom_activate" last_modification_time="Sun, 10 Feb 2008 23:17:10 GMT"/>
</widget>
</child>
</widget>
gchar *s = N_("px");
gchar *s = N_("Fixed _y position:");
gchar *s = N_("Centered");
-gchar *s = N_("From left edge");
-gchar *s = N_("From right edge");
+gchar *s = N_("From top edge");
+gchar *s = N_("From bottom edge");
gchar *s = N_("px");
gchar *s = N_("Move & Resize");
gchar *s = N_("<span weight=\"bold\">Focusing Windows</span>");