[mousetweaks] Change click-type window default to 'show'.



commit f69047afcc3ad2688f70a62476ce9600bf40ebc9
Author: Gerd Kohlberger <gerdk src gnome org>
Date:   Sun Feb 19 04:03:37 2012 +0100

    Change click-type window default to 'show'.
    
    - Don't unset 'ctw-visible' key if the window is destroyed
    - Change command-line option --show-ctw to --hide-ctw

 src/mt-ctw.c  |    9 ---------
 src/mt-main.c |    6 +++---
 2 files changed, 3 insertions(+), 12 deletions(-)
---
diff --git a/src/mt-ctw.c b/src/mt-ctw.c
index 2d9060a..119d808 100644
--- a/src/mt-ctw.c
+++ b/src/mt-ctw.c
@@ -197,13 +197,6 @@ ctw_menu_label_set_bold (GtkWidget *item)
     pango_attr_list_unref (list);
 }
 
-static gboolean
-ctw_window_delete (GtkWidget *widget, GdkEvent *event, gpointer data)
-{
-    g_object_set (mt_settings_get_default (), "ctw-visible", FALSE, NULL);
-    return TRUE;
-}
-
 gboolean
 mt_ctw_init (void)
 {
@@ -230,8 +223,6 @@ mt_ctw_init (void)
     ctw = mt_ctw_get_window ();
     gtk_window_stick (GTK_WINDOW (ctw));
     gtk_window_set_keep_above (GTK_WINDOW (ctw), TRUE);
-    g_signal_connect (ctw, "delete-event",
-                      G_CALLBACK (ctw_window_delete), NULL);
 
     /* init buttons */
     for (i = 0; i < N_CLICK_TYPES; i++)
diff --git a/src/mt-main.c b/src/mt-main.c
index 8685398..8ed82d7 100644
--- a/src/mt-main.c
+++ b/src/mt-main.c
@@ -627,8 +627,8 @@ mt_parse_options (int *argc, char ***argv)
             N_("Time to wait before a simulated secondary click"), "[0.5-3.0]"},
         {"dwell-mode", 'm', 0, G_OPTION_ARG_STRING, &ca.mode,
             N_("Set the active dwell mode"), "[window|gesture]"},
-        {"show-ctw", 'c', 0, G_OPTION_ARG_NONE, &ca.ctw,
-            N_("Show a click-type window"), NULL},
+        {"hide-ctw", 'c', 0, G_OPTION_ARG_NONE, &ca.ctw,
+            N_("Hide the click-type window"), NULL},
         {"threshold", 't', 0, G_OPTION_ARG_INT, &ca.threshold,
             N_("Ignore small pointer movements"), "[0-30]"},
         {"geometry", 'g', 0, G_OPTION_ARG_STRING, &ca.geometry,
@@ -737,7 +737,7 @@ mt_main (int argc, char **argv, MtCliArgs cli_args)
     if (cli_args.threshold >= 0 && cli_args.threshold <= 30)
         ms->dwell_threshold = cli_args.threshold;
     if (cli_args.ctw)
-        ms->ctw_visible = cli_args.ctw;
+        ms->ctw_visible = !cli_args.ctw;
     if (cli_args.mode)
     {
         if (g_str_equal (cli_args.mode, "gesture"))



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]