diff --git a/sample/icon_and_text_1.tint2rc b/sample/icon_and_text_1.tint2rc index e866de4..ead09e6 100644 --- a/sample/icon_and_text_1.tint2rc +++ b/sample/icon_and_text_1.tint2rc @@ -99,6 +99,7 @@ tooltip_font = sans 10 tooltip_font_color = #000000 80 # Mouse +mouse_left = toggle_iconify mouse_middle = none mouse_right = close mouse_scroll_up = toggle @@ -115,4 +116,4 @@ battery_font_color = #FFFFFF 75 battery_padding = 1 0 battery_background_id = 0 -# End of config \ No newline at end of file +# End of config diff --git a/sample/icon_and_text_2.tint2rc b/sample/icon_and_text_2.tint2rc index c30f43d..6c205d5 100644 --- a/sample/icon_and_text_2.tint2rc +++ b/sample/icon_and_text_2.tint2rc @@ -98,6 +98,7 @@ tooltip_font = Sans 10 tooltip_font_color = #000000 80 # Mouse +mouse_left = toggle_iconify mouse_middle = close mouse_right = none mouse_scroll_up = toggle @@ -114,4 +115,4 @@ battery_font_color = #FFFFFF 75 battery_padding = 1 0 battery_background_id = 0 -# End of config \ No newline at end of file +# End of config diff --git a/sample/icon_and_text_3.tint2rc b/sample/icon_and_text_3.tint2rc index f333266..293485a 100644 --- a/sample/icon_and_text_3.tint2rc +++ b/sample/icon_and_text_3.tint2rc @@ -104,6 +104,7 @@ tooltip_font = Sans 9 tooltip_font_color = #5E5E5E 100 # Mouse +mouse_left = toggle_iconify mouse_middle = none mouse_right = close mouse_scroll_up = toggle @@ -120,4 +121,4 @@ battery_font_color = #000000 100 battery_padding = 1 1 battery_background_id = 0 -# End of config \ No newline at end of file +# End of config diff --git a/sample/icon_and_text_4.tint2rc b/sample/icon_and_text_4.tint2rc index 0dcabd7..bc89e79 100644 --- a/sample/icon_and_text_4.tint2rc +++ b/sample/icon_and_text_4.tint2rc @@ -104,6 +104,7 @@ tooltip_font = Sans 12 tooltip_font_color = #FFFFFF 100 # Mouse +mouse_left = toggle_iconify mouse_middle = none mouse_right = close mouse_scroll_up = toggle @@ -120,4 +121,4 @@ battery_font_color = #FFFFFF 75 battery_padding = 1 0 battery_background_id = 1 -# End of config \ No newline at end of file +# End of config diff --git a/sample/icon_only_1.tint2rc b/sample/icon_only_1.tint2rc index 7708b58..2400ae1 100644 --- a/sample/icon_only_1.tint2rc +++ b/sample/icon_only_1.tint2rc @@ -118,6 +118,7 @@ tooltip_font = Sans 8 tooltip_font_color = #FFFFFF 100 # Mouse +mouse_left = toggle_iconify mouse_middle = none mouse_right = close mouse_scroll_up = toggle @@ -134,4 +135,4 @@ battery_font_color = #FFFFFF 75 battery_padding = 2 0 battery_background_id = 0 -# End of config \ No newline at end of file +# End of config diff --git a/sample/icon_only_2.tint2rc b/sample/icon_only_2.tint2rc index 4d1c41f..cf4ae2b 100644 --- a/sample/icon_only_2.tint2rc +++ b/sample/icon_only_2.tint2rc @@ -106,6 +106,7 @@ tooltip_font = sans 10 tooltip_font_color = #000000 80 # Mouse +mouse_left = toggle_iconify mouse_middle = none mouse_right = close mouse_scroll_up = toggle @@ -122,4 +123,4 @@ battery_font_color = #FFFFFF 75 battery_padding = 1 0 battery_background_id = 0 -# End of config \ No newline at end of file +# End of config diff --git a/sample/icon_only_3.tint2rc b/sample/icon_only_3.tint2rc index 0069fbe..684b355 100644 --- a/sample/icon_only_3.tint2rc +++ b/sample/icon_only_3.tint2rc @@ -95,6 +95,7 @@ tooltip_font = sans 10 tooltip_font_color = #000000 80 # Mouse +mouse_left = toggle_iconify mouse_middle = none mouse_right = none mouse_scroll_up = toggle @@ -111,4 +112,4 @@ battery_font_color = #FFFFFF 75 battery_padding = 1 0 battery_background_id = 0 -# End of config \ No newline at end of file +# End of config diff --git a/sample/icon_only_4.tint2rc b/sample/icon_only_4.tint2rc index fbbc760..9b3f624 100644 --- a/sample/icon_only_4.tint2rc +++ b/sample/icon_only_4.tint2rc @@ -95,6 +95,7 @@ tooltip_font = Sans 10 tooltip_font_color = #FFFFFF 80 # Mouse +mouse_left = toggle_iconify mouse_middle = none mouse_right = close mouse_scroll_up = toggle @@ -111,4 +112,4 @@ battery_font_color = #FFFFFF 100 battery_padding = 0 0 battery_background_id = 0 -# End of config \ No newline at end of file +# End of config diff --git a/sample/icon_only_6.tint2rc b/sample/icon_only_6.tint2rc index 75a59d7..c14f337 100644 --- a/sample/icon_only_6.tint2rc +++ b/sample/icon_only_6.tint2rc @@ -106,6 +106,7 @@ tooltip_font = sans 8 tooltip_font_color = #000000 89 # Mouse +mouse_left = toggle_iconify mouse_middle = none mouse_right = close mouse_scroll_up = toggle @@ -122,4 +123,4 @@ battery_font_color = #FFFFFF 75 battery_padding = 4 2 battery_background_id = 1 -# End of config \ No newline at end of file +# End of config diff --git a/sample/icon_only_7.tint2rc b/sample/icon_only_7.tint2rc index f60de10..8b64d8a 100644 --- a/sample/icon_only_7.tint2rc +++ b/sample/icon_only_7.tint2rc @@ -102,6 +102,7 @@ tooltip_font = Sans 7 tooltip_font_color = #FFFFFF 100 # Mouse +mouse_left = toggle_iconify mouse_middle = none mouse_right = close mouse_scroll_up = toggle @@ -118,4 +119,4 @@ battery_font_color = #FFFFFF 100 battery_padding = 1 0 battery_background_id = 0 -# End of config \ No newline at end of file +# End of config diff --git a/sample/text_only_1.tint2rc b/sample/text_only_1.tint2rc index 80c71a6..b06d94d 100644 --- a/sample/text_only_1.tint2rc +++ b/sample/text_only_1.tint2rc @@ -112,6 +112,7 @@ tooltip_font = Aller 8 tooltip_font_color = #D3CAAA 33 # Mouse +mouse_left = toggle_iconify mouse_middle = none mouse_right = close mouse_scroll_up = toggle @@ -128,4 +129,4 @@ battery_font_color = #D3CAAA 48 battery_padding = 4 2 battery_background_id = 4 -# End of config \ No newline at end of file +# End of config diff --git a/sample/text_only_2.tint2rc b/sample/text_only_2.tint2rc index 9c91b28..16c7bcc 100644 --- a/sample/text_only_2.tint2rc +++ b/sample/text_only_2.tint2rc @@ -112,6 +112,7 @@ tooltip_font = Aller 8 tooltip_font_color = #D3CAAA 33 # Mouse +mouse_left = toggle_iconify mouse_middle = none mouse_right = close mouse_scroll_up = toggle @@ -128,4 +129,4 @@ battery_font_color = #D3CAAA 48 battery_padding = 4 2 battery_background_id = 4 -# End of config \ No newline at end of file +# End of config diff --git a/sample/text_only_3.tint2rc b/sample/text_only_3.tint2rc index fa4b137..9d37df5 100644 --- a/sample/text_only_3.tint2rc +++ b/sample/text_only_3.tint2rc @@ -90,6 +90,7 @@ tooltip_font = Sans 9 tooltip_font_color = #FFFFFF 100 # Mouse +mouse_left = toggle_iconify mouse_middle = none mouse_right = close mouse_scroll_up = toggle diff --git a/sample/text_only_4.tint2rc b/sample/text_only_4.tint2rc index ce98bd5..7b23ae7 100644 --- a/sample/text_only_4.tint2rc +++ b/sample/text_only_4.tint2rc @@ -83,6 +83,7 @@ tooltip_font = Sans 12 tooltip_font_color = #FFFFFF 100 # Mouse +mouse_left = toggle_iconify mouse_middle = none mouse_right = close mouse_scroll_up = toggle diff --git a/sample/text_only_5.tint2rc b/sample/text_only_5.tint2rc index 46fa09f..dc66b92 100644 --- a/sample/text_only_5.tint2rc +++ b/sample/text_only_5.tint2rc @@ -96,6 +96,7 @@ tooltip_font = AvantGardeLTMedium 8 tooltip_font_color = #434141 100 # Mouse +mouse_left = toggle_iconify mouse_middle = none mouse_right = close mouse_scroll_up = toggle @@ -112,4 +113,4 @@ battery_font_color = #151515 60 battery_padding = 1 0 battery_background_id = 0 -# End of config \ No newline at end of file +# End of config diff --git a/sample/text_only_6.tint2rc b/sample/text_only_6.tint2rc index b1a3d51..ed86331 100644 --- a/sample/text_only_6.tint2rc +++ b/sample/text_only_6.tint2rc @@ -89,6 +89,7 @@ tooltip_font = Aller 8 tooltip_font_color = #D3CAAA 33 # Mouse +mouse_left = toggle_iconify mouse_middle = none mouse_right = close mouse_scroll_up = toggle @@ -105,4 +106,4 @@ battery_font_color = #FFFFFF 75 battery_padding = 1 0 battery_background_id = 0 -# End of config \ No newline at end of file +# End of config diff --git a/sample/tint2rc b/sample/tint2rc index 4907799..f7e1140 100644 --- a/sample/tint2rc +++ b/sample/tint2rc @@ -99,6 +99,7 @@ tooltip_font = sans 10 tooltip_font_color = #000000 80 # Mouse +mouse_left = toggle_iconify mouse_middle = none mouse_right = close mouse_scroll_up = toggle @@ -115,4 +116,4 @@ battery_font_color = #FFFFFF 74 battery_padding = 1 0 battery_background_id = 0 -# End of config \ No newline at end of file +# End of config diff --git a/src/config.c b/src/config.c index 975287e..d016bea 100644 --- a/src/config.c +++ b/src/config.c @@ -644,6 +644,8 @@ void add_entry (char *key, char *value) } /* Mouse actions */ + else if (strcmp (key, "mouse_left") == 0) + get_action (value, &mouse_left); else if (strcmp (key, "mouse_middle") == 0) get_action (value, &mouse_middle); else if (strcmp (key, "mouse_right") == 0) diff --git a/src/panel.c b/src/panel.c index 5182286..9c91475 100644 --- a/src/panel.c +++ b/src/panel.c @@ -37,6 +37,7 @@ int signal_pending; // -------------------------------------------------- // mouse events +int mouse_left; int mouse_middle; int mouse_right; int mouse_scroll_up; @@ -90,6 +91,7 @@ void default_panel() panel_layer = BOTTOM_LAYER; // default is bottom layer wm_menu = 0; max_tick_urgent = 14; + mouse_left = TOGGLE_ICONIFY; backgrounds = g_array_new(0, 0, sizeof(Background)); memset(&panel_config, 0, sizeof(Panel)); diff --git a/src/panel.h b/src/panel.h index a2b7f14..e0d2f60 100644 --- a/src/panel.h +++ b/src/panel.h @@ -29,6 +29,7 @@ extern int signal_pending; // -------------------------------------------------- // mouse events +extern int mouse_left; extern int mouse_middle; extern int mouse_right; extern int mouse_scroll_up; diff --git a/src/tint.c b/src/tint.c index 943df56..8938418 100644 --- a/src/tint.c +++ b/src/tint.c @@ -349,7 +349,7 @@ int tint2_handles_click(Panel* panel, XButtonEvent* e) { Task* task = click_task(panel, e->x, e->y); if (task) { - if( (e->button == 1) + if( (e->button == 1 && mouse_left != 0) || (e->button == 2 && mouse_middle != 0) || (e->button == 3 && mouse_right != 0) || (e->button == 4 && mouse_scroll_up != 0) @@ -486,6 +486,9 @@ void event_button_release (XEvent *e) int action = TOGGLE_ICONIFY; switch (e->xbutton.button) { + case 1: + action = mouse_left; + break; case 2: action = mouse_middle; break; diff --git a/src/tint2conf/properties.c b/src/tint2conf/properties.c index 1a09ce5..60c3cb7 100644 --- a/src/tint2conf/properties.c +++ b/src/tint2conf/properties.c @@ -46,7 +46,7 @@ GtkWidget *taskbar_active_background, *taskbar_inactive_background; GtkWidget *taskbar_name_active_background, *taskbar_name_inactive_background; // task -GtkWidget *task_mouse_middle, *task_mouse_right, *task_mouse_scroll_up, *task_mouse_scroll_down; +GtkWidget *task_mouse_left, *task_mouse_middle, *task_mouse_right, *task_mouse_scroll_up, *task_mouse_scroll_down; GtkWidget *task_show_icon, *task_show_text, *task_align_center, *task_font_shadow; GtkWidget *task_maximum_width, *task_maximum_height, *task_padding_x, *task_padding_y, *task_font; GtkWidget *task_default_color, *task_default_color_set, @@ -2033,25 +2033,25 @@ void create_task(GtkWidget *parent) gtk_table_set_row_spacings(GTK_TABLE(table), ROW_SPACING); gtk_table_set_col_spacings(GTK_TABLE(table), COL_SPACING); - label = gtk_label_new(_("Middle click")); + label = gtk_label_new(_("Left click")); gtk_misc_set_alignment(GTK_MISC(label), 0, 0); gtk_widget_show(label); gtk_table_attach(GTK_TABLE(table), label, 2, 3, 0, 1, GTK_FILL, 0, 0, 0); - task_mouse_middle = gtk_combo_box_new_text(); - gtk_widget_show(task_mouse_middle); - gtk_table_attach(GTK_TABLE(table), task_mouse_middle, 3, 4, 0, 1, GTK_FILL, 0, 0, 0); - gtk_combo_box_append_text(GTK_COMBO_BOX(task_mouse_middle), _("None")); - gtk_combo_box_append_text(GTK_COMBO_BOX(task_mouse_middle), _("Close")); - gtk_combo_box_append_text(GTK_COMBO_BOX(task_mouse_middle), _("Toggle")); - gtk_combo_box_append_text(GTK_COMBO_BOX(task_mouse_middle), _("Iconify")); - gtk_combo_box_append_text(GTK_COMBO_BOX(task_mouse_middle), _("sShade")); - gtk_combo_box_append_text(GTK_COMBO_BOX(task_mouse_middle), _("Toggle or iconify")); - gtk_combo_box_append_text(GTK_COMBO_BOX(task_mouse_middle), _("Maximize or restore")); - gtk_combo_box_append_text(GTK_COMBO_BOX(task_mouse_middle), _("Desktop left")); - gtk_combo_box_append_text(GTK_COMBO_BOX(task_mouse_middle), _("Desktop right")); - gtk_combo_box_append_text(GTK_COMBO_BOX(task_mouse_middle), _("Next task")); - gtk_combo_box_append_text(GTK_COMBO_BOX(task_mouse_middle), _("Previous task")); + task_mouse_left = gtk_combo_box_new_text(); + gtk_widget_show(task_mouse_left); + gtk_table_attach(GTK_TABLE(table), task_mouse_left, 3, 4, 0, 1, GTK_FILL, 0, 0, 0); + gtk_combo_box_append_text(GTK_COMBO_BOX(task_mouse_left), _("None")); + gtk_combo_box_append_text(GTK_COMBO_BOX(task_mouse_left), _("Close")); + gtk_combo_box_append_text(GTK_COMBO_BOX(task_mouse_left), _("Toggle")); + gtk_combo_box_append_text(GTK_COMBO_BOX(task_mouse_left), _("Iconify")); + gtk_combo_box_append_text(GTK_COMBO_BOX(task_mouse_left), _("Shade")); + gtk_combo_box_append_text(GTK_COMBO_BOX(task_mouse_left), _("Toggle or iconify")); + gtk_combo_box_append_text(GTK_COMBO_BOX(task_mouse_left), _("Maximize or restore")); + gtk_combo_box_append_text(GTK_COMBO_BOX(task_mouse_left), _("Desktop left")); + gtk_combo_box_append_text(GTK_COMBO_BOX(task_mouse_left), _("Desktop right")); + gtk_combo_box_append_text(GTK_COMBO_BOX(task_mouse_left), _("Next task")); + gtk_combo_box_append_text(GTK_COMBO_BOX(task_mouse_left), _("Previous task")); label = gtk_label_new(_("Wheel scroll up")); gtk_misc_set_alignment(GTK_MISC(label), 0, 0); @@ -2073,25 +2073,25 @@ void create_task(GtkWidget *parent) gtk_combo_box_append_text(GTK_COMBO_BOX(task_mouse_scroll_up), _("Next task")); gtk_combo_box_append_text(GTK_COMBO_BOX(task_mouse_scroll_up), _("Previous task")); - label = gtk_label_new(_("Right click")); + label = gtk_label_new(_("Middle click")); gtk_misc_set_alignment(GTK_MISC(label), 0, 0); gtk_widget_show(label); gtk_table_attach(GTK_TABLE(table), label, 2, 3, 1, 2, GTK_FILL, 0, 0, 0); - task_mouse_right = gtk_combo_box_new_text(); - gtk_widget_show(task_mouse_right); - gtk_table_attach(GTK_TABLE(table), task_mouse_right, 3, 4, 1, 2, GTK_FILL, 0, 0, 0); - gtk_combo_box_append_text(GTK_COMBO_BOX(task_mouse_right), _("None")); - gtk_combo_box_append_text(GTK_COMBO_BOX(task_mouse_right), _("Close")); - gtk_combo_box_append_text(GTK_COMBO_BOX(task_mouse_right), _("Toggle")); - gtk_combo_box_append_text(GTK_COMBO_BOX(task_mouse_right), _("Iconify")); - gtk_combo_box_append_text(GTK_COMBO_BOX(task_mouse_right), _("Shade")); - gtk_combo_box_append_text(GTK_COMBO_BOX(task_mouse_right), _("Toggle or iconify")); - gtk_combo_box_append_text(GTK_COMBO_BOX(task_mouse_right), _("Maximize or restore")); - gtk_combo_box_append_text(GTK_COMBO_BOX(task_mouse_right), _("Desktop left")); - gtk_combo_box_append_text(GTK_COMBO_BOX(task_mouse_right), _("Desktop right")); - gtk_combo_box_append_text(GTK_COMBO_BOX(task_mouse_right), _("Next task")); - gtk_combo_box_append_text(GTK_COMBO_BOX(task_mouse_right), _("Previous task")); + task_mouse_middle = gtk_combo_box_new_text(); + gtk_widget_show(task_mouse_middle); + gtk_table_attach(GTK_TABLE(table), task_mouse_middle, 3, 4, 1, 2, GTK_FILL, 0, 0, 0); + gtk_combo_box_append_text(GTK_COMBO_BOX(task_mouse_middle), _("None")); + gtk_combo_box_append_text(GTK_COMBO_BOX(task_mouse_middle), _("Close")); + gtk_combo_box_append_text(GTK_COMBO_BOX(task_mouse_middle), _("Toggle")); + gtk_combo_box_append_text(GTK_COMBO_BOX(task_mouse_middle), _("Iconify")); + gtk_combo_box_append_text(GTK_COMBO_BOX(task_mouse_middle), _("sShade")); + gtk_combo_box_append_text(GTK_COMBO_BOX(task_mouse_middle), _("Toggle or iconify")); + gtk_combo_box_append_text(GTK_COMBO_BOX(task_mouse_middle), _("Maximize or restore")); + gtk_combo_box_append_text(GTK_COMBO_BOX(task_mouse_middle), _("Desktop left")); + gtk_combo_box_append_text(GTK_COMBO_BOX(task_mouse_middle), _("Desktop right")); + gtk_combo_box_append_text(GTK_COMBO_BOX(task_mouse_middle), _("Next task")); + gtk_combo_box_append_text(GTK_COMBO_BOX(task_mouse_middle), _("Previous task")); label = gtk_label_new(_("Wheel scroll down")); gtk_misc_set_alignment(GTK_MISC(label), 0, 0); @@ -2113,14 +2113,34 @@ void create_task(GtkWidget *parent) gtk_combo_box_append_text(GTK_COMBO_BOX(task_mouse_scroll_down), _("Next task")); gtk_combo_box_append_text(GTK_COMBO_BOX(task_mouse_scroll_down), _("Previous task")); - label = gtk_label_new(_("Tooltip")); + label = gtk_label_new(_("Right click")); gtk_misc_set_alignment(GTK_MISC(label), 0, 0); gtk_widget_show(label); gtk_table_attach(GTK_TABLE(table), label, 2, 3, 2, 3, GTK_FILL, 0, 0, 0); + task_mouse_right = gtk_combo_box_new_text(); + gtk_widget_show(task_mouse_right); + gtk_table_attach(GTK_TABLE(table), task_mouse_right, 3, 4, 2, 3, GTK_FILL, 0, 0, 0); + gtk_combo_box_append_text(GTK_COMBO_BOX(task_mouse_right), _("None")); + gtk_combo_box_append_text(GTK_COMBO_BOX(task_mouse_right), _("Close")); + gtk_combo_box_append_text(GTK_COMBO_BOX(task_mouse_right), _("Toggle")); + gtk_combo_box_append_text(GTK_COMBO_BOX(task_mouse_right), _("Iconify")); + gtk_combo_box_append_text(GTK_COMBO_BOX(task_mouse_right), _("Shade")); + gtk_combo_box_append_text(GTK_COMBO_BOX(task_mouse_right), _("Toggle or iconify")); + gtk_combo_box_append_text(GTK_COMBO_BOX(task_mouse_right), _("Maximize or restore")); + gtk_combo_box_append_text(GTK_COMBO_BOX(task_mouse_right), _("Desktop left")); + gtk_combo_box_append_text(GTK_COMBO_BOX(task_mouse_right), _("Desktop right")); + gtk_combo_box_append_text(GTK_COMBO_BOX(task_mouse_right), _("Next task")); + gtk_combo_box_append_text(GTK_COMBO_BOX(task_mouse_right), _("Previous task")); + + label = gtk_label_new(_("Tooltip")); + gtk_misc_set_alignment(GTK_MISC(label), 0, 0); + gtk_widget_show(label); + gtk_table_attach(GTK_TABLE(table), label, 6, 7, 2, 3, GTK_FILL, 0, 0, 0); + tooltip_task_show = gtk_check_button_new(); gtk_widget_show(tooltip_task_show); - gtk_table_attach(GTK_TABLE(table), tooltip_task_show, 3, 4, 2, 3, GTK_FILL, 0, 0, 0); + gtk_table_attach(GTK_TABLE(table), tooltip_task_show, 7, 8, 2, 3, GTK_FILL, 0, 0, 0); change_paragraph(parent); diff --git a/src/tint2conf/properties.h b/src/tint2conf/properties.h index 9238441..7c35673 100644 --- a/src/tint2conf/properties.h +++ b/src/tint2conf/properties.h @@ -51,7 +51,7 @@ extern GtkWidget *taskbar_active_background, *taskbar_inactive_background; extern GtkWidget *taskbar_name_active_background, *taskbar_name_inactive_background; // task -extern GtkWidget *task_mouse_middle, *task_mouse_right, *task_mouse_scroll_up, *task_mouse_scroll_down; +extern GtkWidget *task_mouse_left, *task_mouse_middle, *task_mouse_right, *task_mouse_scroll_up, *task_mouse_scroll_down; extern GtkWidget *task_show_icon, *task_show_text, *task_align_center, *task_font_shadow; extern GtkWidget *task_maximum_width, *task_maximum_height, *task_padding_x, *task_padding_y, *task_font; extern GtkWidget *task_default_color, *task_default_color_set, diff --git a/src/tint2conf/properties_rw.c b/src/tint2conf/properties_rw.c index f45c08b..488853b 100644 --- a/src/tint2conf/properties_rw.c +++ b/src/tint2conf/properties_rw.c @@ -1117,6 +1117,9 @@ void add_entry(char *key, char *value) } /* Mouse actions */ + else if (strcmp(key, "mouse_left") == 0) { + get_action(value, task_mouse_left); + } else if (strcmp(key, "mouse_middle") == 0) { get_action(value, task_mouse_middle); } diff --git a/src/tint2conf/tintwizard.py b/src/tint2conf/tintwizard.py index 3e44549..aa6b37c 100755 --- a/src/tint2conf/tintwizard.py +++ b/src/tint2conf/tintwizard.py @@ -436,6 +436,8 @@ class TintWizardGUI(gtk.Window): self.show_all() + self.resetConfig() + # If tintwizard was launched with a tint2 config filename # as an argument, load that config. if self.oneConfigFile: @@ -862,20 +864,24 @@ class TintWizardGUI(gtk.Window): mouseCmds = ["none", "close", "toggle", "iconify", "shade", "toggle_iconify", "maximize_restore", "desktop_left", "desktop_right", "next_task", "prev_task"] - createLabel(self.tableMouse, text="Middle Mouse Click Action", gridX=0, gridY=0, xPadding=10) - self.mouseMiddle = createComboBox(self.tableMouse, mouseCmds, gridX=1, gridY=0, handler=self.changeOccurred) + createLabel(self.tableMouse, text="Left Mouse Click Action", gridX=0, gridY=0, xPadding=10) + self.mouseLeft = createComboBox(self.tableMouse, mouseCmds, gridX=1, gridY=0, handler=self.changeOccurred) + self.registerComponent("mouse_left", self.mouseLeft) + + createLabel(self.tableMouse, text="Middle Mouse Click Action", gridX=0, gridY=1, xPadding=10) + self.mouseMiddle = createComboBox(self.tableMouse, mouseCmds, gridX=1, gridY=1, handler=self.changeOccurred) self.registerComponent("mouse_middle", self.mouseMiddle) - createLabel(self.tableMouse, text="Right Mouse Click Action", gridX=0, gridY=1, xPadding=10) - self.mouseRight = createComboBox(self.tableMouse, mouseCmds, gridX=1, gridY=1, handler=self.changeOccurred) + createLabel(self.tableMouse, text="Right Mouse Click Action", gridX=0, gridY=2, xPadding=10) + self.mouseRight = createComboBox(self.tableMouse, mouseCmds, gridX=1, gridY=2, handler=self.changeOccurred) self.registerComponent("mouse_right", self.mouseRight) - createLabel(self.tableMouse, text="Mouse Wheel Scroll Up Action", gridX=0, gridY=2, xPadding=10) - self.mouseUp = createComboBox(self.tableMouse, mouseCmds, gridX=1, gridY=2, handler=self.changeOccurred) + createLabel(self.tableMouse, text="Mouse Wheel Scroll Up Action", gridX=0, gridY=3, xPadding=10) + self.mouseUp = createComboBox(self.tableMouse, mouseCmds, gridX=1, gridY=3, handler=self.changeOccurred) self.registerComponent("mouse_scroll_up", self.mouseUp) - createLabel(self.tableMouse, text="Mouse Wheel Scroll Down Action", gridX=0, gridY=3, xPadding=10) - self.mouseDown = createComboBox(self.tableMouse, mouseCmds, gridX=1, gridY=3, handler=self.changeOccurred) + createLabel(self.tableMouse, text="Mouse Wheel Scroll Down Action", gridX=0, gridY=4, xPadding=10) + self.mouseDown = createComboBox(self.tableMouse, mouseCmds, gridX=1, gridY=4, handler=self.changeOccurred) self.registerComponent("mouse_scroll_down", self.mouseDown) def createTooltipsWidgets(self): @@ -1397,6 +1403,7 @@ class TintWizardGUI(gtk.Window): int(self.tooltipFontColButton.get_alpha() / 65535.0 * 100))) self.configBuf.insert(self.configBuf.get_end_iter(), "\n# Mouse\n") + self.configBuf.insert(self.configBuf.get_end_iter(), "mouse_left = %s\n" % (self.mouseLeft.get_active_text())) self.configBuf.insert(self.configBuf.get_end_iter(), "mouse_middle = %s\n" % (self.mouseMiddle.get_active_text())) self.configBuf.insert(self.configBuf.get_end_iter(), "mouse_right = %s\n" % (self.mouseRight.get_active_text())) self.configBuf.insert(self.configBuf.get_end_iter(), "mouse_scroll_up = %s\n" % (self.mouseUp.get_active_text())) @@ -1847,6 +1854,7 @@ class TintWizardGUI(gtk.Window): self.tooltipFontColButton.set_color(gtk.gdk.color_parse(self.defaults["fgColor"])) self.tooltipFontCol.set_text(self.defaults["fgColor"]) # Mouse + self.mouseLeft.set_active(5) self.mouseMiddle.set_active(0) self.mouseRight.set_active(0) self.mouseUp.set_active(0)