From b6c06cc255f83c8ecaa6f7809b2ba6be66e04dd5 Mon Sep 17 00:00:00 2001 From: Dana Jansens Date: Fri, 1 Jun 2007 02:22:14 +0000 Subject: [PATCH] add option for when to show size dialog while resizing --- src/obconf.glade | 88 ++++++++++++++++++++++++++++++++++++++++++++++++ src/strings.c | 4 +++ src/windows.c | 33 ++++++++++++++++++ 3 files changed, 125 insertions(+) diff --git a/src/obconf.glade b/src/obconf.glade index 3ac3ce5..a0979e5 100644 --- a/src/obconf.glade +++ b/src/obconf.glade @@ -1316,6 +1316,94 @@ C - The close button + + + True + False + 12 + + + + True + _Show size dialog: + True + False + GTK_JUSTIFY_LEFT + False + False + 0 + 0.5 + 0 + 0 + dock_position + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + 0 + False + False + + + + + + True + True + 0 + + + + + + + True + When resizing terminal windows + True + + + + + + + True + Always + True + + + + + + + True + Never + True + + + + + + + + 0 + False + False + + + + + 0 + True + True + + + + + + + True diff --git a/src/strings.c b/src/strings.c index 67255f0..6ad773a 100644 --- a/src/strings.c +++ b/src/strings.c @@ -40,6 +40,10 @@ gchar *s = N_("_Place new windows under the mouse pointer"); gchar *s = N_("Moving and Resizing Windows"); gchar *s = N_(" "); gchar *s = N_("Update the window c_ontents while resizing"); +gchar *s = N_("_Show size dialog:"); +gchar *s = N_("When resizing terminal windows"); +gchar *s = N_("Always"); +gchar *s = N_("Never"); gchar *s = N_("Amount of resistance against other _windows:"); gchar *s = N_("px"); gchar *s = N_("Amount of resistance against screen _edges:"); diff --git a/src/windows.c b/src/windows.c index dc690a1..00a3e09 100644 --- a/src/windows.c +++ b/src/windows.c @@ -22,11 +22,16 @@ static gboolean mapping = FALSE; +#define POPUP_NONPIXEL 0 +#define POPUP_ALWAYS 1 +#define POPUP_NEVER 2 + void windows_setup_tab() { GtkWidget *w, *w1, *w2; GtkSizeGroup *group; gchar *s; + gint pos; mapping = TRUE; @@ -65,6 +70,14 @@ void windows_setup_tab() !g_ascii_strcasecmp(s, "UnderMouse")); g_free(s); + w = get_widget("resize_popup"); + s = tree_get_string("resize/popupShow", "NonPixel"); + if (!strcasecmp(s, "Always")) pos = POPUP_ALWAYS; + else if (!strcasecmp(s, "Never")) pos = POPUP_NEVER; + else pos = POPUP_NONPIXEL; + g_free(s); + gtk_option_menu_set_history(GTK_OPTION_MENU(w), pos); + mapping = FALSE; } @@ -106,3 +119,23 @@ void on_resize_contents_toggled(GtkToggleButton *w, gpointer data) tree_set_bool("resize/drawContents", gtk_toggle_button_get_active(w)); } +void on_resize_popup_nonpixel_activate(GtkMenuItem *w, gpointer data) +{ + if (mapping) return; + + tree_set_string("resize/popupShow", "NonPixel"); +} + +void on_resize_popup_always_activate(GtkMenuItem *w, gpointer data) +{ + if (mapping) return; + + tree_set_string("resize/popupShow", "Always"); +} + +void on_resize_popup_never_activate(GtkMenuItem *w, gpointer data) +{ + if (mapping) return; + + tree_set_string("resize/popupShow", "Never"); +} -- 2.39.2