tint2conf: Tooltips
jump to
@@ -367,6 +367,7 @@ GTK_TYPE_INT);
GtkWidget *table, *label, *button; int row, col; + GtkTooltips *tooltips = gtk_tooltips_new(); table = gtk_table_new(1, 4, FALSE); gtk_widget_show(table);@@ -386,18 +387,21 @@ current_background = create_background_combo();
gtk_widget_show(current_background); gtk_table_attach(GTK_TABLE(table), current_background, col, col+1, row, row+1, GTK_FILL, 0, 0, 0); col++; + gtk_tooltips_set_tip(tooltips, current_background, "Selects the background you would like to modify", NULL); button = gtk_button_new_from_stock("gtk-add"); gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(background_duplicate), NULL); gtk_widget_show(button); gtk_table_attach(GTK_TABLE(table), button, col, col+1, row, row+1, GTK_FILL, 0, 0, 0); col++; + gtk_tooltips_set_tip(tooltips, button, "Creates a copy of the current background", NULL); button = gtk_button_new_from_stock("gtk-remove"); gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(background_delete), NULL); gtk_widget_show(button); gtk_table_attach(GTK_TABLE(table), button, col, col+1, row, row+1, GTK_FILL, 0, 0, 0); col++; + gtk_tooltips_set_tip(tooltips, button, "Deletes the current background", NULL); table = gtk_table_new(4, 4, FALSE); gtk_widget_show(table);@@ -417,6 +421,7 @@ gtk_color_button_set_use_alpha(GTK_COLOR_BUTTON(background_fill_color), TRUE);
gtk_widget_show(background_fill_color); gtk_table_attach(GTK_TABLE(table), background_fill_color, col, col+1, row, row+1, GTK_FILL, 0, 0, 0); col++; + gtk_tooltips_set_tip(tooltips, background_fill_color, "The fill color of the current background", NULL); row++, col = 2; label = gtk_label_new(_("Border color"));@@ -430,6 +435,7 @@ gtk_color_button_set_use_alpha(GTK_COLOR_BUTTON(background_border_color), TRUE);
gtk_widget_show(background_border_color); gtk_table_attach(GTK_TABLE(table), background_border_color, col, col+1, row, row+1, GTK_FILL, 0, 0, 0); col++; + gtk_tooltips_set_tip(tooltips, background_border_color, "The border color of the current background", NULL); row++, col = 2; label = gtk_label_new(_("Border width"));@@ -442,6 +448,7 @@ background_border_width = gtk_spin_button_new_with_range(0, 100, 1);
gtk_widget_show(background_border_width); gtk_table_attach(GTK_TABLE(table), background_border_width, col, col+1, row, row+1, GTK_FILL, 0, 0, 0); col++; + gtk_tooltips_set_tip(tooltips, background_border_width, "The width of the border of the current background, in pixels", NULL); row++, col = 2; label = gtk_label_new(_("Corner radius"));@@ -454,6 +461,7 @@ background_corner_radius = gtk_spin_button_new_with_range(0, 100, 1);
gtk_widget_show(background_corner_radius); gtk_table_attach(GTK_TABLE(table), background_corner_radius, col, col+1, row, row+1, GTK_FILL, 0, 0, 0); col++; + gtk_tooltips_set_tip(tooltips, background_corner_radius, "The corner radius of the current background", NULL); g_signal_connect(G_OBJECT(current_background), "changed", G_CALLBACK(current_background_changed), NULL); g_signal_connect(G_OBJECT(background_fill_color), "color-set", G_CALLBACK(background_update), NULL);@@ -755,6 +763,7 @@ int i;
GtkWidget *table, *hbox, *position; GtkWidget *label; int row, col; + GtkTooltips *tooltips = gtk_tooltips_new(); label = gtk_label_new(_("<b>Geometry</b>")); gtk_misc_set_alignment(GTK_MISC(label), 0, 0);@@ -794,17 +803,29 @@ gtk_widget_set_size_request(screen_position[i], 15, 25);
} } gtk_table_attach_defaults(GTK_TABLE(position), screen_position[0], 1, 2, 0, 1); + gtk_tooltips_set_tip(tooltips, screen_position[0], "Position on screen: top-left, horizontal panel", NULL); gtk_table_attach_defaults(GTK_TABLE(position), screen_position[1], 2, 3, 0, 1); + gtk_tooltips_set_tip(tooltips, screen_position[1], "Position on screen: top-center, horizontal panel", NULL); gtk_table_attach_defaults(GTK_TABLE(position), screen_position[2], 3, 4, 0, 1); + gtk_tooltips_set_tip(tooltips, screen_position[2], "Position on screen: top-right, horizontal panel", NULL); gtk_table_attach_defaults(GTK_TABLE(position), screen_position[3], 0, 1, 1, 2); + gtk_tooltips_set_tip(tooltips, screen_position[3], "Position on screen: top-left, vertical panel", NULL); gtk_table_attach_defaults(GTK_TABLE(position), screen_position[4], 0, 1, 2, 3); + gtk_tooltips_set_tip(tooltips, screen_position[4], "Position on screen: center-left, vertical panel", NULL); gtk_table_attach_defaults(GTK_TABLE(position), screen_position[5], 0, 1, 3, 4); + gtk_tooltips_set_tip(tooltips, screen_position[5], "Position on screen: bottom-left, vertical panel", NULL); gtk_table_attach_defaults(GTK_TABLE(position), screen_position[6], 4, 5, 1, 2); + gtk_tooltips_set_tip(tooltips, screen_position[6], "Position on screen: top-right, vertical panel", NULL); gtk_table_attach_defaults(GTK_TABLE(position), screen_position[7], 4, 5, 2, 3); + gtk_tooltips_set_tip(tooltips, screen_position[7], "Position on screen: center-right, vertical panel", NULL); gtk_table_attach_defaults(GTK_TABLE(position), screen_position[8], 4, 5, 3, 4); + gtk_tooltips_set_tip(tooltips, screen_position[8], "Position on screen: bottom-right, vertical panel", NULL); gtk_table_attach_defaults(GTK_TABLE(position), screen_position[9], 1, 2, 4, 5); + gtk_tooltips_set_tip(tooltips, screen_position[9], "Position on screen: bottom-left, horizontal panel", NULL); gtk_table_attach_defaults(GTK_TABLE(position), screen_position[10], 2, 3, 4, 5); + gtk_tooltips_set_tip(tooltips, screen_position[10], "Position on screen: bottom-center, horizontal panel", NULL); gtk_table_attach_defaults(GTK_TABLE(position), screen_position[11], 3, 4, 4, 5); + gtk_tooltips_set_tip(tooltips, screen_position[11], "Position on screen: bottom-right, horizontal panel", NULL); gtk_table_attach(GTK_TABLE(table), position, col, col+1, row, row+1, GTK_FILL, 0, 0, 0); row++;@@ -826,6 +847,7 @@ gtk_combo_box_append_text(GTK_COMBO_BOX(panel_combo_monitor), _("3"));
gtk_combo_box_append_text(GTK_COMBO_BOX(panel_combo_monitor), _("4")); gtk_combo_box_append_text(GTK_COMBO_BOX(panel_combo_monitor), _("5")); gtk_combo_box_append_text(GTK_COMBO_BOX(panel_combo_monitor), _("6")); + gtk_tooltips_set_tip(tooltips, panel_combo_monitor, "The monitor on which the panel is placed", NULL); row++; col = 2;@@ -839,6 +861,7 @@ panel_width = gtk_spin_button_new_with_range(0, 9000, 1);
gtk_widget_show(panel_width); gtk_table_attach(GTK_TABLE(table), panel_width, col, col+1, row, row+1, GTK_FILL, 0, 0, 0); col++; + gtk_tooltips_set_tip(tooltips, panel_width, "The width of the panel", NULL); panel_combo_width_type = gtk_combo_box_new_text(); gtk_widget_show(panel_combo_width_type);@@ -846,6 +869,7 @@ gtk_table_attach(GTK_TABLE(table), panel_combo_width_type, col, col+1, row, row+1, GTK_FILL, 0, 0, 0);
col++; gtk_combo_box_append_text(GTK_COMBO_BOX(panel_combo_width_type), _("Percent")); gtk_combo_box_append_text(GTK_COMBO_BOX(panel_combo_width_type), _("Pixels")); + gtk_tooltips_set_tip(tooltips, panel_combo_width_type, "The units used to specify the width of the panel: pixels or percentage of the monitor size", NULL); row++; col = 2;@@ -859,6 +883,7 @@ panel_height = gtk_spin_button_new_with_range(0, 9000, 1);
gtk_widget_show(panel_height); gtk_table_attach(GTK_TABLE(table), panel_height, col, col+1, row, row+1, GTK_FILL, 0, 0, 0); col++; + gtk_tooltips_set_tip(tooltips, panel_height, "The height of the panel", NULL); panel_combo_height_type = gtk_combo_box_new_text(); gtk_widget_show(panel_combo_height_type);@@ -866,6 +891,7 @@ gtk_table_attach(GTK_TABLE(table), panel_combo_height_type, col, col+1, row, row+1, GTK_FILL, 0, 0, 0);
col++; gtk_combo_box_append_text(GTK_COMBO_BOX(panel_combo_height_type), _("Percent")); gtk_combo_box_append_text(GTK_COMBO_BOX(panel_combo_height_type), _("Pixels")); + gtk_tooltips_set_tip(tooltips, panel_combo_height_type, "The units used to specify the height of the panel: pixels or percentage of the monitor size", NULL); row++; col = 2;@@ -879,6 +905,10 @@ panel_margin_x = gtk_spin_button_new_with_range(0, 500, 1);
gtk_widget_show(panel_margin_x); gtk_table_attach(GTK_TABLE(table), panel_margin_x, col, col+1, row, row+1, GTK_FILL, 0, 0, 0); col++; + gtk_tooltips_set_tip(tooltips, panel_margin_x, "Creates a space between the panel and the edge of the monitor. " + "For left-aligned panels, the space is created on the right of the panel; " + "for right-aligned panels, it is created on the left; " + "for centered panels, it is evenly distributed on both sides of the panel.", NULL); row++; col = 2;@@ -892,6 +922,10 @@ panel_margin_y = gtk_spin_button_new_with_range(0, 500, 1);
gtk_widget_show(panel_margin_y); gtk_table_attach(GTK_TABLE(table), panel_margin_y, col, col+1, row, row+1, GTK_FILL, 0, 0, 0); col++; + gtk_tooltips_set_tip(tooltips, panel_margin_y, "Creates a space between the panel and the edge of the monitor. " + "For top-aligned panels, the space is created on the bottom of the panel; " + "for bottom-aligned panels, it is created on the top; " + "for centered panels, it is evenly distributed on both sides of the panel.", NULL); change_paragraph(parent);@@ -919,6 +953,8 @@ panel_background = create_background_combo();
gtk_widget_show(panel_background); gtk_table_attach(GTK_TABLE(table), panel_background, col, col+1, row, row+1, GTK_FILL, 0, 0, 0); col++; + gtk_tooltips_set_tip(tooltips, panel_background, "Selects the background used to display the panel. " + "Backgrounds can be edited in the Backgrounds tab.", NULL); row++; col = 2;@@ -932,6 +968,8 @@ panel_padding_x = gtk_spin_button_new_with_range(0, 500, 1);
gtk_widget_show(panel_padding_x); gtk_table_attach(GTK_TABLE(table), panel_padding_x, col, col+1, row, row+1, GTK_FILL, 0, 0, 0); col++; + gtk_tooltips_set_tip(tooltips, panel_padding_x, "Specifies the horizontal padding of the panel. " + "This is the space between the border of the panel and the elements inside.", NULL); row++; col = 2;@@ -945,6 +983,8 @@ panel_padding_y = gtk_spin_button_new_with_range(0, 500, 1);
gtk_widget_show(panel_padding_y); gtk_table_attach(GTK_TABLE(table), panel_padding_y, col, col+1, row, row+1, GTK_FILL, 0, 0, 0); col++; + gtk_tooltips_set_tip(tooltips, panel_padding_y, "Specifies the vertical padding of the panel. " + "This is the space between the border of the panel and the elements inside.", NULL); row++; col = 2;@@ -958,6 +998,7 @@ panel_spacing = gtk_spin_button_new_with_range(0, 500, 1);
gtk_widget_show(panel_spacing); gtk_table_attach(GTK_TABLE(table), panel_spacing, col, col+1, row, row+1, GTK_FILL, 0, 0, 0); col++; + gtk_tooltips_set_tip(tooltips, panel_spacing, "Specifies the spacing between elements inside the panel.", NULL); row++; col = 2;@@ -971,6 +1012,8 @@ disable_transparency = gtk_check_button_new();
gtk_widget_show(disable_transparency); gtk_table_attach(GTK_TABLE(table), disable_transparency, col, col+1, row, row+1, GTK_FILL, 0, 0, 0); col++; + gtk_tooltips_set_tip(tooltips, disable_transparency, "If enabled, the compositor will not be used to draw a transparent panel. " + "May fix display corruption problems on broken graphics stacks.", NULL); row++, col = 2; label = gtk_label_new(_("Font shadows"));@@ -983,6 +1026,8 @@ font_shadow = gtk_check_button_new();
gtk_widget_show(font_shadow); gtk_table_attach(GTK_TABLE(table), font_shadow, col, col+1, row, row+1, GTK_FILL, 0, 0, 0); col++; + gtk_tooltips_set_tip(tooltips, font_shadow, "If enabled, a shadow will be drawn behind text. " + "This may improve legibility on transparent panels.", NULL); change_paragraph(parent);@@ -1010,6 +1055,7 @@ panel_autohide = gtk_check_button_new();
gtk_widget_show(panel_autohide); gtk_table_attach(GTK_TABLE(table), panel_autohide, col, col+1, row, row+1, GTK_FILL, 0, 0, 0); col++; + gtk_tooltips_set_tip(tooltips, panel_autohide, "If enabled, the panel is hidden when the mouse cursor leaves the panel.", NULL); row++; col = 2;@@ -1023,6 +1069,7 @@ panel_autohide_show_time = gtk_spin_button_new_with_range(0, 10000, 0.1);
gtk_widget_show(panel_autohide_show_time); gtk_table_attach(GTK_TABLE(table), panel_autohide_show_time, col, col+1, row, row+1, GTK_FILL, 0, 0, 0); col++; + gtk_tooltips_set_tip(tooltips, panel_autohide_show_time, "Specifies a delay after which the panel is shown when the mouse cursor enters the panel.", NULL); label = gtk_label_new(_("seconds")); gtk_misc_set_alignment(GTK_MISC(label), 0, 0);@@ -1042,6 +1089,7 @@ panel_autohide_size = gtk_spin_button_new_with_range(1, 500, 1);
gtk_widget_show(panel_autohide_size); gtk_table_attach(GTK_TABLE(table), panel_autohide_size, col, col+1, row, row+1, GTK_FILL, 0, 0, 0); col++; + gtk_tooltips_set_tip(tooltips, panel_autohide_size, "Specifies the size of the panel when hidden, in pixels.", NULL); row++; col = 2;@@ -1055,6 +1103,7 @@ panel_autohide_hide_time = gtk_spin_button_new_with_range(0, 10000, 0.1);
gtk_widget_show(panel_autohide_hide_time); gtk_table_attach(GTK_TABLE(table), panel_autohide_hide_time, col, col+1, row, row+1, GTK_FILL, 0, 0, 0); col++; + gtk_tooltips_set_tip(tooltips, panel_autohide_hide_time, "Specifies a delay after which the panel is hidden when the mouse cursor leaves the panel.", NULL); label = gtk_label_new(_("seconds")); gtk_misc_set_alignment(GTK_MISC(label), 0, 0);@@ -1078,7 +1127,7 @@ gtk_table_set_col_spacings(GTK_TABLE(table), COL_SPACING);
row = 0; col = 2; - label = gtk_label_new(_("Forward mouse clicks")); + label = gtk_label_new(_("Forward mouse events")); gtk_misc_set_alignment(GTK_MISC(label), 0, 0); gtk_widget_show(label); gtk_table_attach(GTK_TABLE(table), label, col, col+1, row, row+1, GTK_FILL, 0, 0, 0);@@ -1088,6 +1137,9 @@ panel_wm_menu = gtk_check_button_new();
gtk_widget_show(panel_wm_menu); gtk_table_attach(GTK_TABLE(table), panel_wm_menu, col, col+1, row, row+1, GTK_FILL, 0, 0, 0); col++; + gtk_tooltips_set_tip(tooltips, panel_wm_menu, "If enabled, mouse events not handled by panel elements are forwarded to the desktop. " + "Useful on desktop environments that show a start menu when right clicking the desktop, " + "or switch the desktop when rotating the mouse wheel over the desktop.", NULL); row++; col = 2;@@ -1101,6 +1153,9 @@ panel_dock = gtk_check_button_new();
gtk_widget_show(panel_dock); gtk_table_attach(GTK_TABLE(table), panel_dock, col, col+1, row, row+1, GTK_FILL, 0, 0, 0); col++; + gtk_tooltips_set_tip(tooltips, panel_dock, "If enabled, places the panel in the dock area of the window manager. " + "Windows placed in the dock are usually treated differently than normal windows. " + "The exact behavior depends on the window manager and its configuration.", NULL); row++; col = 2;@@ -1117,6 +1172,11 @@ col++;
gtk_combo_box_append_text(GTK_COMBO_BOX(panel_combo_layer), _("Top")); gtk_combo_box_append_text(GTK_COMBO_BOX(panel_combo_layer), _("Normal")); gtk_combo_box_append_text(GTK_COMBO_BOX(panel_combo_layer), _("Bottom")); + gtk_tooltips_set_tip(tooltips, panel_combo_layer, "Specifies the layer on which the panel window should be placed. \n" + "Top means the panel should always cover other windows. \n" + "Bottom means other windows should always cover the panel. \n" + "Normal means that other windows may or may not cover the panel, depending on which has focus. \n" + "Note that some window managers prevent this option from working correctly if the panel is placed in the dock.", NULL); row++; col = 2;@@ -1133,6 +1193,11 @@ col++;
gtk_combo_box_append_text(GTK_COMBO_BOX(panel_combo_strut_policy), _("Match the panel size")); gtk_combo_box_append_text(GTK_COMBO_BOX(panel_combo_strut_policy), _("Match the hidden panel size")); gtk_combo_box_append_text(GTK_COMBO_BOX(panel_combo_strut_policy), _("Fill the screen")); + gtk_tooltips_set_tip(tooltips, panel_combo_strut_policy, "Specifies the size of maximized windows. \n" + "Match the panel size means that maximized windows should extend to the edge of the panel. \n" + "Match the hidden panel size means that maximized windows should extend to the edge of the panel when hidden; " + "when visible, the panel and the windows will overlap. \n" + "Fill the screen means that maximized windows will always have the same size as the screen.", NULL); row++; col = 2;@@ -1148,6 +1213,9 @@ gtk_entry_set_width_chars(GTK_ENTRY(panel_window_name), 28);
gtk_entry_set_text(GTK_ENTRY(panel_window_name), "tint2"); gtk_table_attach(GTK_TABLE(table), panel_window_name, col, col+1, row, row+1, GTK_FILL, 0, 0, 0); col++; + gtk_tooltips_set_tip(tooltips, panel_window_name, "Specifies the name of the panel window. " + "This is useful if you want to configure special treatment of tint2 windows in your " + "window manager or compositor.", NULL); change_paragraph(parent); }@@ -1155,6 +1223,7 @@
void create_panel_items(GtkWidget *parent) { GtkWidget *table, *label, *button, *image; + GtkTooltips *tooltips = gtk_tooltips_new(); panel_items = gtk_list_store_new(itemsNumCols, G_TYPE_STRING, G_TYPE_STRING); all_items = gtk_list_store_new(itemsNumCols, G_TYPE_STRING, G_TYPE_STRING);@@ -1197,6 +1266,9 @@ gtk_tree_view_set_headers_visible(GTK_TREE_VIEW(panel_items_view), FALSE);
gtk_tree_selection_set_mode(gtk_tree_view_get_selection(GTK_TREE_VIEW(panel_items_view)), GTK_SELECTION_SINGLE); gtk_tree_view_set_model(GTK_TREE_VIEW(panel_items_view), GTK_TREE_MODEL(panel_items)); g_object_unref(panel_items); + gtk_tooltips_set_tip(tooltips, panel_items_view, "Specifies the elements that will appear in the panel and their order. " + "Elements can be added by selecting them in the list of available elements, then clicking on " + "the add left button.", NULL); all_items_view = gtk_tree_view_new();@@ -1210,6 +1282,9 @@ gtk_tree_view_set_headers_visible(GTK_TREE_VIEW(all_items_view), FALSE);
gtk_tree_selection_set_mode(gtk_tree_view_get_selection(GTK_TREE_VIEW(all_items_view)), GTK_SELECTION_SINGLE); gtk_tree_view_set_model(GTK_TREE_VIEW(all_items_view), GTK_TREE_MODEL(all_items)); g_object_unref(all_items); + gtk_tooltips_set_tip(tooltips, all_items_view, "Lists all the possible elements that can appear in the panel. " + "Elements can be added to the panel by selecting them, then clicking on " + "the add left button.", NULL); table = gtk_table_new(2, 3, FALSE); gtk_widget_show(table);@@ -1217,13 +1292,13 @@ gtk_box_pack_start(GTK_BOX(parent), table, FALSE, FALSE, 0);
gtk_table_set_row_spacings(GTK_TABLE(table), ROW_SPACING); gtk_table_set_col_spacings(GTK_TABLE(table), COL_SPACING); - label = gtk_label_new(_("<b>Items selected</b>")); + label = gtk_label_new(_("<b>Elements selected</b>")); gtk_misc_set_alignment(GTK_MISC(label), 0, 0); gtk_label_set_use_markup(GTK_LABEL(label), TRUE); gtk_widget_show(label); gtk_table_attach(GTK_TABLE(table), label, 0, 1, 0, 1, GTK_FILL, 0, 0, 0); - label = gtk_label_new(_("<b>Items available</b>")); + label = gtk_label_new(_("<b>Elements available</b>")); gtk_misc_set_alignment(GTK_MISC(label), 0, 0); gtk_label_set_use_markup(GTK_LABEL(label), TRUE); gtk_widget_show(label);@@ -1240,6 +1315,7 @@ gtk_button_set_image(GTK_BUTTON(button), image);
gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(panel_move_item_up), NULL); gtk_widget_show(button); gtk_box_pack_start(GTK_BOX(vbox), button, FALSE, FALSE, 0); + gtk_tooltips_set_tip(tooltips, button, "Moves up the current element in the list of selected elements.", NULL); button = gtk_button_new(); image = gtk_image_new_from_stock(GTK_STOCK_GO_DOWN, GTK_ICON_SIZE_BUTTON);@@ -1247,6 +1323,7 @@ gtk_button_set_image(GTK_BUTTON(button), image);
gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(panel_move_item_down), NULL); gtk_widget_show(button); gtk_box_pack_start(GTK_BOX(vbox), button, FALSE, FALSE, 0); + gtk_tooltips_set_tip(tooltips, button, "Moves down the current element in the list of selected elements.", NULL); label = gtk_label_new(_(" ")); gtk_misc_set_alignment(GTK_MISC(label), 0, 0);@@ -1259,6 +1336,7 @@ gtk_button_set_image(GTK_BUTTON(button), image);
gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(panel_add_item), NULL); gtk_widget_show(button); gtk_box_pack_start(GTK_BOX(vbox), button, FALSE, FALSE, 0); + gtk_tooltips_set_tip(tooltips, button, "Copies the current element in the list of available elements to the list of selected elements.", NULL); button = gtk_button_new(); image = gtk_image_new_from_stock(GTK_STOCK_GO_FORWARD, GTK_ICON_SIZE_BUTTON);@@ -1266,6 +1344,7 @@ gtk_button_set_image(GTK_BUTTON(button), image);
gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(panel_remove_item), NULL); gtk_widget_show(button); gtk_box_pack_start(GTK_BOX(vbox), button, FALSE, FALSE, 0); + gtk_tooltips_set_tip(tooltips, button, "Removes the current element from the list of selected elements.", NULL); gtk_table_attach(GTK_TABLE(table), vbox, 1, 2, 1, 2, GTK_FILL, GTK_FILL, 0, 0);@@ -1785,6 +1864,7 @@
void create_launcher(GtkWidget *parent) { GtkWidget *image; + GtkTooltips *tooltips = gtk_tooltips_new(); icon_theme = NULL;@@ -1809,7 +1889,9 @@ gtk_tree_view_set_headers_visible(GTK_TREE_VIEW(launcher_apps_view), FALSE);
gtk_tree_selection_set_mode(gtk_tree_view_get_selection(GTK_TREE_VIEW(launcher_apps_view)), GTK_SELECTION_SINGLE); gtk_tree_view_set_model(GTK_TREE_VIEW(launcher_apps_view), GTK_TREE_MODEL(launcher_apps)); g_object_unref(launcher_apps); - + gtk_tooltips_set_tip(tooltips, launcher_apps_view, "Specifies the application launchers that will appear in the launcher and their order. " + "Launchers can be added by selecting an item in the list of available applications, then clicking on " + "the add left button.", NULL); all_apps_view = gtk_tree_view_new(); gtk_tree_view_insert_column_with_attributes(GTK_TREE_VIEW(all_apps_view),@@ -1828,6 +1910,9 @@ gtk_tree_view_set_headers_visible(GTK_TREE_VIEW(all_apps_view), FALSE);
gtk_tree_selection_set_mode(gtk_tree_view_get_selection(GTK_TREE_VIEW(all_apps_view)), GTK_SELECTION_SINGLE); gtk_tree_view_set_model(GTK_TREE_VIEW(all_apps_view), GTK_TREE_MODEL(all_apps)); g_object_unref(all_apps); + gtk_tooltips_set_tip(tooltips, all_apps_view, "Lists all the applications detected on the system. " + "Launchers can be added to the launcher by selecting an application, then clicking on " + "the add left button.", NULL); GtkWidget *table, *label, *button; int row, col;@@ -1861,6 +1946,7 @@ gtk_button_set_image(GTK_BUTTON(button), image);
gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(launcher_move_app_up), NULL); gtk_widget_show(button); gtk_box_pack_start(GTK_BOX(vbox), button, FALSE, FALSE, 0); + gtk_tooltips_set_tip(tooltips, button, "Moves up the current launcher in the list of selected applications.", NULL); button = gtk_button_new(); image = gtk_image_new_from_stock(GTK_STOCK_GO_DOWN, GTK_ICON_SIZE_BUTTON);@@ -1868,6 +1954,7 @@ gtk_button_set_image(GTK_BUTTON(button), image);
gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(launcher_move_app_down), NULL); gtk_widget_show(button); gtk_box_pack_start(GTK_BOX(vbox), button, FALSE, FALSE, 0); + gtk_tooltips_set_tip(tooltips, button, "Moves down the current launcher in the list of selected applications.", NULL); label = gtk_label_new(_(" ")); gtk_misc_set_alignment(GTK_MISC(label), 0, 0);@@ -1880,6 +1967,7 @@ gtk_button_set_image(GTK_BUTTON(button), image);
gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(launcher_add_app), NULL); gtk_widget_show(button); gtk_box_pack_start(GTK_BOX(vbox), button, FALSE, FALSE, 0); + gtk_tooltips_set_tip(tooltips, button, "Copies the current application in the list of available applications to the list of selected applications.", NULL); button = gtk_button_new(); image = gtk_image_new_from_stock(GTK_STOCK_GO_FORWARD, GTK_ICON_SIZE_BUTTON);@@ -1887,6 +1975,7 @@ gtk_button_set_image(GTK_BUTTON(button), image);
gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(launcher_remove_app), NULL); gtk_widget_show(button); gtk_box_pack_start(GTK_BOX(vbox), button, FALSE, FALSE, 0); + gtk_tooltips_set_tip(tooltips, button, "Removes the current application from the list of selected application.", NULL); gtk_table_attach(GTK_TABLE(table), vbox, 1, 2, 1, 2, GTK_FILL, GTK_FILL, 0, 0);@@ -1907,6 +1996,8 @@
launcher_apps_dirs = gtk_entry_new(); gtk_widget_show(launcher_apps_dirs); gtk_box_pack_start(GTK_BOX(parent), launcher_apps_dirs, FALSE, FALSE, 0); + gtk_tooltips_set_tip(tooltips, launcher_apps_dirs, "Specifies a path to a directory from which the launcher is loading all .desktop files (all subdirectories are explored recursively). " + "Can be used multiple times, in which case the paths must be separated by commas. Leading ~ is expaned to the path of the user's home directory.", NULL); label = gtk_label_new(_("<b>Appearance</b>")); gtk_misc_set_alignment(GTK_MISC(label), 0, 0);@@ -1919,7 +2010,7 @@ gtk_widget_show(table);
gtk_box_pack_start(GTK_BOX(parent), table, FALSE, FALSE, 0); gtk_table_set_row_spacings(GTK_TABLE(table), ROW_SPACING); gtk_table_set_col_spacings(GTK_TABLE(table), COL_SPACING); - + row = 0, col = 2; label = gtk_label_new(_("Background")); gtk_misc_set_alignment(GTK_MISC(label), 0, 0);@@ -1931,6 +2022,8 @@ launcher_background = create_background_combo();
gtk_widget_show(launcher_background); gtk_table_attach(GTK_TABLE(table), launcher_background, col, col+1, row, row+1, GTK_FILL, 0, 0, 0); col++; + gtk_tooltips_set_tip(tooltips, launcher_background, "Selects the background used to display the launcher. " + "Backgrounds can be edited in the Backgrounds tab.", NULL); row++, col = 2; label = gtk_label_new(_("Horizontal padding"));@@ -1943,6 +2036,8 @@ launcher_padding_x = gtk_spin_button_new_with_range(0, 500, 1);
gtk_widget_show(launcher_padding_x); gtk_table_attach(GTK_TABLE(table), launcher_padding_x, col, col+1, row, row+1, GTK_FILL, 0, 0, 0); col++; + gtk_tooltips_set_tip(tooltips, launcher_padding_x, "Specifies the horizontal padding of the launcher. " + "This is the space between the border and the elements inside.", NULL); row++, col = 2; label = gtk_label_new(_("Vertical padding"));@@ -1955,6 +2050,8 @@ launcher_padding_y = gtk_spin_button_new_with_range(0, 500, 1);
gtk_widget_show(launcher_padding_y); gtk_table_attach(GTK_TABLE(table), launcher_padding_y, col, col+1, row, row+1, GTK_FILL, 0, 0, 0); col++; + gtk_tooltips_set_tip(tooltips, launcher_padding_y, "Specifies the vertical padding of the launcher. " + "This is the space between the border and the elements inside.", NULL); row++, col = 2; label = gtk_label_new(_("Spacing"));@@ -1967,6 +2064,7 @@ launcher_spacing = gtk_spin_button_new_with_range(0, 500, 1);
gtk_widget_show(launcher_spacing); gtk_table_attach(GTK_TABLE(table), launcher_spacing, col, col+1, row, row+1, GTK_FILL, 0, 0, 0); col++; + gtk_tooltips_set_tip(tooltips, launcher_spacing, "Specifies the spacing between the elements inside the launcher.", NULL); row++, col = 2; label = gtk_label_new(_("Icon size"));@@ -1979,6 +2077,7 @@ launcher_icon_size = gtk_spin_button_new_with_range(0, 500, 1);
gtk_widget_show(launcher_icon_size); gtk_table_attach(GTK_TABLE(table), launcher_icon_size, col, col+1, row, row+1, GTK_FILL, 0, 0, 0); col++; + gtk_tooltips_set_tip(tooltips, launcher_icon_size, "Specifies the size of the launcher icons, in pixels.", NULL); row++, col = 2; label = gtk_label_new(_("Icon theme"));@@ -1995,6 +2094,9 @@ g_signal_connect(G_OBJECT(launcher_icon_theme), "changed", G_CALLBACK(launcher_icon_theme_changed), NULL);
gtk_widget_show(launcher_icon_theme); gtk_table_attach(GTK_TABLE(table), launcher_icon_theme, col, col+1, row, row+1, GTK_FILL, 0, 0, 0); col++; + gtk_tooltips_set_tip(tooltips, launcher_icon_theme, "The icon theme used to display launcher icons. If left blank, " + "tint2 will detect and use the icon theme of your desktop as long as you have " + "an XSETTINGS manager running (most desktop environments do).", NULL); row++, col = 2; label = gtk_label_new(_("Startup notifications"));@@ -2007,6 +2109,8 @@ startup_notifications = gtk_check_button_new();
gtk_widget_show(startup_notifications); gtk_table_attach(GTK_TABLE(table), startup_notifications, col, col+1, row, row+1, GTK_FILL, 0, 0, 0); col++; + gtk_tooltips_set_tip(tooltips, startup_notifications, "If enabled, startup notifications are shown when starting applications from the launcher. " + "The appearance may vary depending on your desktop environment configuration; normally, a busy mouse cursor is displayed until the application starts.", NULL); row++, col = 2; label = gtk_label_new(_("Tooltips"));@@ -2019,6 +2123,7 @@ launcher_tooltip = gtk_check_button_new();
gtk_widget_show(launcher_tooltip); gtk_table_attach(GTK_TABLE(table), launcher_tooltip, col, col+1, row, row+1, GTK_FILL, 0, 0, 0); col++; + gtk_tooltips_set_tip(tooltips, launcher_tooltip, "If enabled, shows a tooltip with the application name when the mouse is moved over an application launcher.", NULL); change_paragraph(parent);@@ -2052,6 +2157,7 @@ void create_taskbar(GtkWidget *parent)
{ GtkWidget *table, *label; int row, col; + GtkTooltips *tooltips = gtk_tooltips_new(); label = gtk_label_new(_("<b>Options</b>")); gtk_misc_set_alignment(GTK_MISC(label), 0, 0);@@ -2078,6 +2184,7 @@ taskbar_show_desktop = gtk_check_button_new();
gtk_widget_show(taskbar_show_desktop); gtk_table_attach(GTK_TABLE(table), taskbar_show_desktop, col, col+1, row, row+1, GTK_FILL, 0, 0, 0); col++; + gtk_tooltips_set_tip(tooltips, taskbar_show_desktop, "If enabled, the taskbar is split into multiple smaller taskbars, one for each virtual desktop.", NULL); col = 2; row++;@@ -2091,6 +2198,8 @@ taskbar_distribute_size = gtk_check_button_new();
gtk_widget_show(taskbar_distribute_size); gtk_table_attach(GTK_TABLE(table), taskbar_distribute_size, col, col+1, row, row+1, GTK_FILL, 0, 0, 0); col++; + gtk_tooltips_set_tip(tooltips, taskbar_distribute_size, "If enabled and 'Show a taskbar for each desktop' is also enabled, " + "the available size is distributed between taskbars proportionally to the number of tasks.", NULL); col = 2; row++;@@ -2104,6 +2213,7 @@ taskbar_hide_inactive_tasks = gtk_check_button_new();
gtk_widget_show(taskbar_hide_inactive_tasks); gtk_table_attach(GTK_TABLE(table), taskbar_hide_inactive_tasks, col, col+1, row, row+1, GTK_FILL, 0, 0, 0); col++; + gtk_tooltips_set_tip(tooltips, taskbar_hide_inactive_tasks, "If enabled, only the active task will be shown in the taskbar.", NULL); col = 2; row++;@@ -2117,6 +2227,8 @@ taskbar_hide_diff_monitor = gtk_check_button_new();
gtk_widget_show(taskbar_hide_diff_monitor); gtk_table_attach(GTK_TABLE(table), taskbar_hide_diff_monitor, col, col+1, row, row+1, GTK_FILL, 0, 0, 0); col++; + gtk_tooltips_set_tip(tooltips, taskbar_hide_diff_monitor, "If enabled, tasks that are not on the same monitor as the panel will not be displayed. " + "This behavior is enabled automatically if the panel monitor is set to 'All'.", NULL); row++; col = 2;@@ -2133,6 +2245,10 @@ col++;
gtk_combo_box_append_text(GTK_COMBO_BOX(taskbar_sort_order), _("None")); gtk_combo_box_append_text(GTK_COMBO_BOX(taskbar_sort_order), _("By title")); gtk_combo_box_append_text(GTK_COMBO_BOX(taskbar_sort_order), _("By center")); + gtk_tooltips_set_tip(tooltips, taskbar_sort_order, "Specifies how tasks should be sorted on the taskbar. \n" + "'None' means that new tasks are added to the end, and the user can also reorder task buttons by mouse dragging. \n" + "'By title' means that tasks are sorted by their window titles. \n" + "'By center' means that tasks are sorted geometrically by their window centers.", NULL); change_paragraph(parent);@@ -2160,6 +2276,8 @@ taskbar_padding_x = gtk_spin_button_new_with_range(0, 500, 1);
gtk_widget_show(taskbar_padding_x); gtk_table_attach(GTK_TABLE(table), taskbar_padding_x, col, col+1, row, row+1, GTK_FILL, 0, 0, 0); col++; + gtk_tooltips_set_tip(tooltips, taskbar_padding_x, "Specifies the horizontal padding of the taskbar. " + "This is the space between the border and the elements inside.", NULL); col = 2; row++;@@ -2173,6 +2291,8 @@ taskbar_padding_y = gtk_spin_button_new_with_range(0, 500, 1);
gtk_widget_show(taskbar_padding_y); gtk_table_attach(GTK_TABLE(table), taskbar_padding_y, col, col+1, row, row+1, GTK_FILL, 0, 0, 0); col++; + gtk_tooltips_set_tip(tooltips, taskbar_padding_y, "Specifies the vertical padding of the taskbar. " + "This is the space between the border and the elements inside.", NULL); col = 2; row++;@@ -2186,32 +2306,36 @@ taskbar_spacing = gtk_spin_button_new_with_range(0, 500, 1);
gtk_widget_show(taskbar_spacing); gtk_table_attach(GTK_TABLE(table), taskbar_spacing, col, col+1, row, row+1, GTK_FILL, 0, 0, 0); col++; + gtk_tooltips_set_tip(tooltips, taskbar_spacing, "Specifies the spacing between the elements inside the taskbar.", NULL); col = 2; row++; - label = gtk_label_new(_("Inactive background")); + label = gtk_label_new(_("Active background")); gtk_misc_set_alignment(GTK_MISC(label), 0, 0); gtk_widget_show(label); gtk_table_attach(GTK_TABLE(table), label, col, col+1, row, row+1, GTK_FILL, 0, 0, 0); col++; - taskbar_inactive_background = create_background_combo(); - gtk_widget_show(taskbar_inactive_background); - gtk_table_attach(GTK_TABLE(table), taskbar_inactive_background, col, col+1, row, row+1, GTK_FILL, 0, 0, 0); + taskbar_active_background = create_background_combo(); + gtk_widget_show(taskbar_active_background); + gtk_table_attach(GTK_TABLE(table), taskbar_active_background, col, col+1, row, row+1, GTK_FILL, 0, 0, 0); col++; - + gtk_tooltips_set_tip(tooltips, taskbar_active_background, "Selects the background used to display the taskbar of the current desktop. " + "Backgrounds can be edited in the Backgrounds tab.", NULL); col = 2; row++; - label = gtk_label_new(_("Active background")); + label = gtk_label_new(_("Inactive background")); gtk_misc_set_alignment(GTK_MISC(label), 0, 0); gtk_widget_show(label); gtk_table_attach(GTK_TABLE(table), label, col, col+1, row, row+1, GTK_FILL, 0, 0, 0); col++; - taskbar_active_background = create_background_combo(); - gtk_widget_show(taskbar_active_background); - gtk_table_attach(GTK_TABLE(table), taskbar_active_background, col, col+1, row, row+1, GTK_FILL, 0, 0, 0); + taskbar_inactive_background = create_background_combo(); + gtk_widget_show(taskbar_inactive_background); + gtk_table_attach(GTK_TABLE(table), taskbar_inactive_background, col, col+1, row, row+1, GTK_FILL, 0, 0, 0); col++; + gtk_tooltips_set_tip(tooltips, taskbar_inactive_background, "Selects the background used to display taskbars of inactive desktops. " + "Backgrounds can be edited in the Backgrounds tab.", NULL); change_paragraph(parent);@@ -2240,6 +2364,8 @@ taskbar_show_name = gtk_check_button_new();
gtk_widget_show(taskbar_show_name); gtk_table_attach(GTK_TABLE(table), taskbar_show_name, col, col+1, row, row+1, GTK_FILL, 0, 0, 0); col++; + gtk_tooltips_set_tip(tooltips, taskbar_show_name, "If enabled, displays the name of the desktop at the top/left of the taskbar. " + "The name is set by your window manager; you might be able to configure it there.", NULL); col = 2; row++;@@ -2253,34 +2379,38 @@ taskbar_name_padding_x = gtk_spin_button_new_with_range(0, 500, 1);
gtk_widget_show(taskbar_name_padding_x); gtk_table_attach(GTK_TABLE(table), taskbar_name_padding_x, col, col+1, row, row+1, GTK_FILL, 0, 0, 0); col++; + gtk_tooltips_set_tip(tooltips, taskbar_name_padding_x, "Specifies the horizontal padding of the desktop name. " + "This is the space between the border and the text inside.", NULL); col = 2; row++; - label = gtk_label_new(_("Inactive font color")); + label = gtk_label_new(_("Active font color")); gtk_misc_set_alignment(GTK_MISC(label), 0, 0); gtk_widget_show(label); gtk_table_attach(GTK_TABLE(table), label, col, col+1, row, row+1, GTK_FILL, 0, 0, 0); col++; - taskbar_name_inactive_color = gtk_color_button_new(); - gtk_color_button_set_use_alpha(GTK_COLOR_BUTTON(taskbar_name_inactive_color), TRUE); - gtk_widget_show(taskbar_name_inactive_color); - gtk_table_attach(GTK_TABLE(table), taskbar_name_inactive_color, col, col+1, row, row+1, GTK_FILL, 0, 0, 0); + taskbar_name_active_color = gtk_color_button_new(); + gtk_color_button_set_use_alpha(GTK_COLOR_BUTTON(taskbar_name_active_color), TRUE); + gtk_widget_show(taskbar_name_active_color); + gtk_table_attach(GTK_TABLE(table), taskbar_name_active_color, col, col+1, row, row+1, GTK_FILL, 0, 0, 0); col++; + gtk_tooltips_set_tip(tooltips, taskbar_name_active_color, "Specifies the font color used to display the name of the current desktop.", NULL); col = 2; row++; - label = gtk_label_new(_("Active font color")); + label = gtk_label_new(_("Inactive font color")); gtk_misc_set_alignment(GTK_MISC(label), 0, 0); gtk_widget_show(label); gtk_table_attach(GTK_TABLE(table), label, col, col+1, row, row+1, GTK_FILL, 0, 0, 0); col++; - taskbar_name_active_color = gtk_color_button_new(); - gtk_color_button_set_use_alpha(GTK_COLOR_BUTTON(taskbar_name_active_color), TRUE); - gtk_widget_show(taskbar_name_active_color); - gtk_table_attach(GTK_TABLE(table), taskbar_name_active_color, col, col+1, row, row+1, GTK_FILL, 0, 0, 0); + taskbar_name_inactive_color = gtk_color_button_new(); + gtk_color_button_set_use_alpha(GTK_COLOR_BUTTON(taskbar_name_inactive_color), TRUE); + gtk_widget_show(taskbar_name_inactive_color); + gtk_table_attach(GTK_TABLE(table), taskbar_name_inactive_color, col, col+1, row, row+1, GTK_FILL, 0, 0, 0); col++; + gtk_tooltips_set_tip(tooltips, taskbar_name_inactive_color, "Specifies the font color used to display the name of inactive desktops.", NULL); col = 2; row++;@@ -2294,33 +2424,38 @@ taskbar_name_font = gtk_font_button_new();
gtk_widget_show(taskbar_name_font); gtk_table_attach(GTK_TABLE(table), taskbar_name_font, col, col+3, row, row+1, GTK_FILL, 0, 0, 0); col++; - //gtk_font_button_set_show_style(GTK_FONT_BUTTON(taskbar_name_font), FALSE); + gtk_font_button_set_show_style(GTK_FONT_BUTTON(taskbar_name_font), TRUE); + gtk_tooltips_set_tip(tooltips, taskbar_name_font, "Specifies the font used to display the desktop name.", NULL); col = 2; row++; - label = gtk_label_new(_("Inactive background")); + label = gtk_label_new(_("Active background")); gtk_misc_set_alignment(GTK_MISC(label), 0, 0); gtk_widget_show(label); gtk_table_attach(GTK_TABLE(table), label, col, col+1, row, row+1, GTK_FILL, 0, 0, 0); col++; - taskbar_name_inactive_background = create_background_combo(); - gtk_widget_show(taskbar_name_inactive_background); - gtk_table_attach(GTK_TABLE(table), taskbar_name_inactive_background, col, col+1, row, row+1, GTK_FILL, 0, 0, 0); + taskbar_name_active_background = create_background_combo(); + gtk_widget_show(taskbar_name_active_background); + gtk_table_attach(GTK_TABLE(table), taskbar_name_active_background, col, col+1, row, row+1, GTK_FILL, 0, 0, 0); col++; + gtk_tooltips_set_tip(tooltips, taskbar_name_active_background, "Selects the background used to display the name of the current desktop. " + "Backgrounds can be edited in the Backgrounds tab.", NULL); col = 2; row++; - label = gtk_label_new(_("Active background")); + label = gtk_label_new(_("Inactive background")); gtk_misc_set_alignment(GTK_MISC(label), 0, 0); gtk_widget_show(label); gtk_table_attach(GTK_TABLE(table), label, col, col+1, row, row+1, GTK_FILL, 0, 0, 0); col++; - taskbar_name_active_background = create_background_combo(); - gtk_widget_show(taskbar_name_active_background); - gtk_table_attach(GTK_TABLE(table), taskbar_name_active_background, col, col+1, row, row+1, GTK_FILL, 0, 0, 0); + taskbar_name_inactive_background = create_background_combo(); + gtk_widget_show(taskbar_name_inactive_background); + gtk_table_attach(GTK_TABLE(table), taskbar_name_inactive_background, col, col+1, row, row+1, GTK_FILL, 0, 0, 0); col++; + gtk_tooltips_set_tip(tooltips, taskbar_name_inactive_background, "Selects the background used to display the name of inactive desktops. " + "Backgrounds can be edited in the Backgrounds tab.", NULL); change_paragraph(parent); }@@ -2329,6 +2464,7 @@ void create_task(GtkWidget *parent)
{ GtkWidget *table, *label, *notebook; int row, col; + GtkTooltips *tooltips = gtk_tooltips_new(); label = gtk_label_new(_("<b>Mouse events</b>")); gtk_misc_set_alignment(GTK_MISC(label), 0, 0);@@ -2364,6 +2500,18 @@ 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")); + gtk_tooltips_set_tip(tooltips, task_mouse_left, "Specifies the action performed when task buttons receive a left click event: \n" + "'None' means that no action is taken. \n" + "'Close' closes the task. \n" + "'Toggle' toggles the task. \n" + "'Iconify' iconifies (minimizes) the task. \n" + "'Shade' shades (collapses) the task. \n" + "'Toggle or iconify' toggles or iconifies the task. \n" + "'Maximize or restore' maximizes or minimizes the task. \n" + "'Desktop left' sends the task to the previous desktop. \n" + "'Desktop right' sends the task to the next desktop. \n" + "'Next task' sends the focus to the next task. \n" + "'Previous task' sends the focus to the previous task.", NULL); row++, col = 2; label = gtk_label_new(_("Wheel scroll up"));@@ -2387,6 +2535,18 @@ gtk_combo_box_append_text(GTK_COMBO_BOX(task_mouse_scroll_up), _("Desktop left"));
gtk_combo_box_append_text(GTK_COMBO_BOX(task_mouse_scroll_up), _("Desktop right")); 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")); + gtk_tooltips_set_tip(tooltips, task_mouse_scroll_up, "Specifies the action performed when task buttons receive a scroll up event: \n" + "'None' means that no action is taken. \n" + "'Close' closes the task. \n" + "'Toggle' toggles the task. \n" + "'Iconify' iconifies (minimizes) the task. \n" + "'Shade' shades (collapses) the task. \n" + "'Toggle or iconify' toggles or iconifies the task. \n" + "'Maximize or restore' maximizes or minimizes the task. \n" + "'Desktop left' sends the task to the previous desktop. \n" + "'Desktop right' sends the task to the next desktop. \n" + "'Next task' sends the focus to the next task. \n" + "'Previous task' sends the focus to the previous task.", NULL); row++, col = 2; label = gtk_label_new(_("Middle click"));@@ -2410,6 +2570,18 @@ 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")); + gtk_tooltips_set_tip(tooltips, task_mouse_middle, "Specifies the action performed when task buttons receive a middle click event: \n" + "'None' means that no action is taken. \n" + "'Close' closes the task. \n" + "'Toggle' toggles the task. \n" + "'Iconify' iconifies (minimizes) the task. \n" + "'Shade' shades (collapses) the task. \n" + "'Toggle or iconify' toggles or iconifies the task. \n" + "'Maximize or restore' maximizes or minimizes the task. \n" + "'Desktop left' sends the task to the previous desktop. \n" + "'Desktop right' sends the task to the next desktop. \n" + "'Next task' sends the focus to the next task. \n" + "'Previous task' sends the focus to the previous task.", NULL); row++, col = 2; label = gtk_label_new(_("Wheel scroll down"));@@ -2433,6 +2605,18 @@ gtk_combo_box_append_text(GTK_COMBO_BOX(task_mouse_scroll_down), _("Desktop left"));
gtk_combo_box_append_text(GTK_COMBO_BOX(task_mouse_scroll_down), _("Desktop right")); 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")); + gtk_tooltips_set_tip(tooltips, task_mouse_scroll_down, "Specifies the action performed when task buttons receive a scroll down event: \n" + "'None' means that no action is taken. \n" + "'Close' closes the task. \n" + "'Toggle' toggles the task. \n" + "'Iconify' iconifies (minimizes) the task. \n" + "'Shade' shades (collapses) the task. \n" + "'Toggle or iconify' toggles or iconifies the task. \n" + "'Maximize or restore' maximizes or minimizes the task. \n" + "'Desktop left' sends the task to the previous desktop. \n" + "'Desktop right' sends the task to the next desktop. \n" + "'Next task' sends the focus to the next task. \n" + "'Previous task' sends the focus to the previous task.", NULL); row++, col = 2; label = gtk_label_new(_("Right click"));@@ -2456,6 +2640,18 @@ 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")); + gtk_tooltips_set_tip(tooltips, task_mouse_right, "Specifies the action performed when task buttons receive a right click event: \n" + "'None' means that no action is taken. \n" + "'Close' closes the task. \n" + "'Toggle' toggles the task. \n" + "'Iconify' iconifies (minimizes) the task. \n" + "'Shade' shades (collapses) the task. \n" + "'Toggle or iconify' toggles or iconifies the task. \n" + "'Maximize or restore' maximizes or minimizes the task. \n" + "'Desktop left' sends the task to the previous desktop. \n" + "'Desktop right' sends the task to the next desktop. \n" + "'Next task' sends the focus to the next task. \n" + "'Previous task' sends the focus to the previous task.", NULL); change_paragraph(parent);@@ -2482,6 +2678,7 @@ task_show_icon = gtk_check_button_new();
gtk_widget_show(task_show_icon); gtk_table_attach(GTK_TABLE(table), task_show_icon, col, col+1, row, row+1, GTK_FILL, 0, 0, 0); col++; + gtk_tooltips_set_tip(tooltips, task_show_icon, "If enabled, the window icon is shown on task buttons.", NULL); row++, col = 2; label = gtk_label_new(_("Show text"));@@ -2494,6 +2691,7 @@ task_show_text = gtk_check_button_new();
gtk_widget_show(task_show_text); gtk_table_attach(GTK_TABLE(table), task_show_text, col, col+1, row, row+1, GTK_FILL, 0, 0, 0); col++; + gtk_tooltips_set_tip(tooltips, task_show_text, "If enabled, the window title is shown on task buttons.", NULL); row++, col = 2; label = gtk_label_new(_("Center text"));@@ -2506,6 +2704,7 @@ task_align_center = gtk_check_button_new();
gtk_widget_show(task_align_center); gtk_table_attach(GTK_TABLE(table), task_align_center, col, col+1, row, row+1, GTK_FILL, 0, 0, 0); col++; + gtk_tooltips_set_tip(tooltips, task_align_center, "If enabled, the text is centered on task buttons. Otherwise, it is left-aligned.", NULL); row++, col = 2; label = gtk_label_new(_("Show tooltips"));@@ -2518,6 +2717,7 @@ tooltip_task_show = gtk_check_button_new();
gtk_widget_show(tooltip_task_show); gtk_table_attach(GTK_TABLE(table), tooltip_task_show, col, col+1, row, row+1, GTK_FILL, 0, 0, 0); col++; + gtk_tooltips_set_tip(tooltips, tooltip_task_show, "If enabled, a tooltip showing the window title is displayed when the mouse cursor moves over task buttons.", NULL); row++, col = 2; label = gtk_label_new(_("Maximum width"));@@ -2530,6 +2730,7 @@ task_maximum_width = gtk_spin_button_new_with_range(0, 9000, 1);
gtk_widget_show(task_maximum_width); gtk_table_attach(GTK_TABLE(table), task_maximum_width, col, col+1, row, row+1, GTK_FILL, 0, 0, 0); col++; + gtk_tooltips_set_tip(tooltips, task_maximum_width, "Specifies the maximum width of the task buttons.", NULL); row++, col = 2; label = gtk_label_new(_("Maximum height"));@@ -2542,6 +2743,7 @@ task_maximum_height = gtk_spin_button_new_with_range(0, 9000, 1);
gtk_widget_show(task_maximum_height); gtk_table_attach(GTK_TABLE(table), task_maximum_height, col, col+1, row, row+1, GTK_FILL, 0, 0, 0); col++; + gtk_tooltips_set_tip(tooltips, task_maximum_height, "Specifies the maximum height of the task buttons.", NULL); row++, col = 2; label = gtk_label_new(_("Horizontal padding"));@@ -2554,6 +2756,8 @@ task_padding_x = gtk_spin_button_new_with_range(0, 9000, 1);
gtk_widget_show(task_padding_x); gtk_table_attach(GTK_TABLE(table), task_padding_x, col, col+1, row, row+1, GTK_FILL, 0, 0, 0); col++; + gtk_tooltips_set_tip(tooltips, task_padding_x, "Specifies the horizontal padding of the task buttons. " + "This is the space between the border and the content inside.", NULL); row++, col = 2; label = gtk_label_new(_("Vertical padding"));@@ -2566,6 +2770,8 @@ task_padding_y = gtk_spin_button_new_with_range(0, 9000, 1);
gtk_widget_show(task_padding_y); gtk_table_attach(GTK_TABLE(table), task_padding_y, col, col+1, row, row+1, GTK_FILL, 0, 0, 0); col++; + gtk_tooltips_set_tip(tooltips, task_padding_y, "Specifies the vertical padding of the task buttons. " + "This is the space between the border and the content inside.", NULL); row++, col = 2; label = gtk_label_new(_("Font"));@@ -2578,7 +2784,8 @@ task_font = gtk_font_button_new();
gtk_widget_show(task_font); gtk_table_attach(GTK_TABLE(table), task_font, col, col+1, row, row+1, GTK_FILL, 0, 0, 0); col++; -// gtk_font_button_set_show_style(GTK_FONT_BUTTON(task_font), FALSE); + gtk_font_button_set_show_style(GTK_FONT_BUTTON(task_font), TRUE); + gtk_tooltips_set_tip(tooltips, task_font, "Specifies the font used to display the task button text.", NULL); change_paragraph(parent);@@ -2713,6 +2920,7 @@ GtkWidget **task_status_icon_brightness,
GtkWidget **task_status_background, GtkWidget **task_status_background_set) { + GtkTooltips *tooltips = gtk_tooltips_new(); GtkWidget *label = gtk_label_new(_(name)); gtk_widget_show(label); GtkWidget *page_task = gtk_vbox_new(FALSE, DEFAULT_HOR_SPACING);@@ -2730,6 +2938,7 @@ *task_status_color_set = gtk_check_button_new();
gtk_widget_show(*task_status_color_set); gtk_table_attach(GTK_TABLE(table), *task_status_color_set, 0, 1, 0, 1, GTK_FILL, 0, 0, 0); gtk_signal_connect(GTK_OBJECT(*task_status_color_set), "toggled", GTK_SIGNAL_FUNC(task_status_toggle_button_callback), NULL); + gtk_tooltips_set_tip(tooltips, *task_status_color_set, "If enabled, a custom font color is used to display the task text.", NULL); label = gtk_label_new(_("Font color")); gtk_misc_set_alignment(GTK_MISC(label), 0, 0);@@ -2740,11 +2949,13 @@ *task_status_color = gtk_color_button_new();
gtk_color_button_set_use_alpha(GTK_COLOR_BUTTON(*task_status_color), TRUE); gtk_widget_show(*task_status_color); gtk_table_attach(GTK_TABLE(table), *task_status_color, 2, 3, 0, 1, GTK_FILL, 0, 0, 0); + gtk_tooltips_set_tip(tooltips, *task_status_color, "Specifies the font color used to display the task text.", NULL); *task_status_icon_osb_set = gtk_check_button_new(); gtk_widget_show(*task_status_icon_osb_set); gtk_table_attach(GTK_TABLE(table), *task_status_icon_osb_set, 0, 1, 1, 2, GTK_FILL, 0, 0, 0); gtk_signal_connect(GTK_OBJECT(*task_status_icon_osb_set), "toggled", GTK_SIGNAL_FUNC(task_status_toggle_button_callback), NULL); + gtk_tooltips_set_tip(tooltips, *task_status_icon_osb_set, "If enabled, a custom opacity/saturation/brightness is used to display the task icon.", NULL); label = gtk_label_new(_("Icon opacity")); gtk_misc_set_alignment(GTK_MISC(label), 0, 0);@@ -2754,6 +2965,7 @@
*task_status_icon_opacity = gtk_spin_button_new_with_range(0, 100, 1); gtk_widget_show(*task_status_icon_opacity); gtk_table_attach(GTK_TABLE(table), *task_status_icon_opacity, 2, 3, 1, 2, GTK_FILL, 0, 0, 0); + gtk_tooltips_set_tip(tooltips, *task_status_icon_opacity, "Specifies the opacity (in %) used to display the task icon.", NULL); label = gtk_label_new(_("Icon saturation")); gtk_misc_set_alignment(GTK_MISC(label), 0, 0);@@ -2763,6 +2975,7 @@
*task_status_icon_saturation = gtk_spin_button_new_with_range(-100, 100, 1); gtk_widget_show(*task_status_icon_saturation); gtk_table_attach(GTK_TABLE(table), *task_status_icon_saturation, 2, 3, 2, 3, GTK_FILL, 0, 0, 0); + gtk_tooltips_set_tip(tooltips, *task_status_icon_saturation, "Specifies the saturation adjustment (in %) used to display the task icon.", NULL); label = gtk_label_new(_("Icon brightness")); gtk_misc_set_alignment(GTK_MISC(label), 0, 0);@@ -2772,11 +2985,13 @@
*task_status_icon_brightness = gtk_spin_button_new_with_range(-100, 100, 1); gtk_widget_show(*task_status_icon_brightness); gtk_table_attach(GTK_TABLE(table), *task_status_icon_brightness, 2, 3, 3, 4, GTK_FILL, 0, 0, 0); + gtk_tooltips_set_tip(tooltips, *task_status_icon_brightness, "Specifies the brightness adjustment (in %) used to display the task icon.", NULL); *task_status_background_set = gtk_check_button_new(); gtk_widget_show(*task_status_background_set); gtk_table_attach(GTK_TABLE(table), *task_status_background_set, 0, 1, 4, 5, GTK_FILL, 0, 0, 0); gtk_signal_connect(GTK_OBJECT(*task_status_background_set), "toggled", GTK_SIGNAL_FUNC(task_status_toggle_button_callback), NULL); + gtk_tooltips_set_tip(tooltips, *task_status_background_set, "If enabled, a custom background is used to display the task.", NULL); label = gtk_label_new(_("Background")); gtk_misc_set_alignment(GTK_MISC(label), 0, 0);@@ -2786,6 +3001,8 @@
*task_status_background = create_background_combo(); gtk_widget_show(*task_status_background); gtk_table_attach(GTK_TABLE(table), *task_status_background, 2, 3, 4, 5, GTK_FILL, 0, 0, 0); + gtk_tooltips_set_tip(tooltips, *task_status_background, "Selects the background used to display the task. " + "Backgrounds can be edited in the Backgrounds tab.", NULL); if (*task_status_color == task_urgent_color) { label = gtk_label_new(_("Blinks"));@@ -2796,6 +3013,7 @@
task_urgent_blinks = gtk_spin_button_new_with_range(0, 1000000, 1); gtk_widget_show(task_urgent_blinks); gtk_table_attach(GTK_TABLE(table), task_urgent_blinks, 2, 3, 5, 6, GTK_FILL, 0, 0, 0); + gtk_tooltips_set_tip(tooltips, task_urgent_blinks, "Specifies how many times urgent tasks blink.", NULL); } task_status_toggle_button_callback(*task_status_color_set, NULL);@@ -2808,6 +3026,7 @@ {
GtkWidget *table; GtkWidget *label; int row, col; + GtkTooltips *tooltips = gtk_tooltips_new(); table = gtk_table_new(1, 2, FALSE); gtk_widget_show(table);@@ -2839,6 +3058,9 @@ gtk_widget_show(clock_format_line1);
gtk_entry_set_width_chars(GTK_ENTRY(clock_format_line1), 16); gtk_table_attach(GTK_TABLE(table), clock_format_line1, col, col+1, row, row+1, GTK_FILL, 0, 0, 0); col++; + gtk_tooltips_set_tip(tooltips, clock_format_line1, + "Specifies the format used to display the first line of the clock text. " + "See 'man strftime' for all the available options.", NULL); row++, col = 2; label = gtk_label_new(_("Second line format"));@@ -2852,6 +3074,9 @@ gtk_widget_show(clock_format_line2);
gtk_entry_set_width_chars(GTK_ENTRY(clock_format_line2), 16); gtk_table_attach(GTK_TABLE(table), clock_format_line2, col, col+1, row, row+1, GTK_FILL, 0, 0, 0); col++; + gtk_tooltips_set_tip(tooltips, clock_format_line2, + "Specifies the format used to display the second line of the clock text. " + "See 'man strftime' for all the available options.", NULL); row++, col = 2; label = gtk_label_new(_("First line timezone"));@@ -2865,6 +3090,9 @@ gtk_widget_show(clock_tmz_line1);
gtk_entry_set_width_chars(GTK_ENTRY(clock_tmz_line1), 16); gtk_table_attach(GTK_TABLE(table), clock_tmz_line1, col, col+1, row, row+1, GTK_FILL, 0, 0, 0); col++; + gtk_tooltips_set_tip(tooltips, clock_tmz_line1, + "Specifies the timezone used to display the first line of the clock text. If empty, the current timezone is used. " + "Otherwise, it must be set to a valid value of the TZ environment variable.", NULL); row++, col = 2; label = gtk_label_new(_("Second line timezone"));@@ -2878,6 +3106,9 @@ gtk_widget_show(clock_tmz_line2);
gtk_entry_set_width_chars(GTK_ENTRY(clock_tmz_line2), 16); gtk_table_attach(GTK_TABLE(table), clock_tmz_line2, col, col+1, row, row+1, GTK_FILL, 0, 0, 0); col++; + gtk_tooltips_set_tip(tooltips, clock_tmz_line2, + "Specifies the timezone used to display the second line of the clock text. If empty, the current timezone is used. " + "Otherwise, it must be set to a valid value of the TZ environment variable.", NULL); change_paragraph(parent);@@ -2905,6 +3136,8 @@ gtk_widget_show(clock_left_command);
gtk_entry_set_width_chars(GTK_ENTRY(clock_left_command), 50); gtk_table_attach(GTK_TABLE(table), clock_left_command, col, col+1, row, row+1, GTK_FILL, 0, 0, 0); col++; + gtk_tooltips_set_tip(tooltips, clock_left_command, + "Specifies a command that will be executed when the clock receives a left click.", NULL); row++, col = 2; label = gtk_label_new(_("Right click command"));@@ -2918,6 +3151,8 @@ gtk_widget_show(clock_right_command);
gtk_entry_set_width_chars(GTK_ENTRY(clock_right_command), 50); gtk_table_attach(GTK_TABLE(table), clock_right_command, col, col+1, row, row+1, GTK_FILL, 0, 0, 0); col++; + gtk_tooltips_set_tip(tooltips, clock_right_command, + "Specifies a command that will be executed when the clock receives a right click.", NULL); change_paragraph(parent);@@ -2944,6 +3179,8 @@ clock_background = create_background_combo();
gtk_widget_show(clock_background); gtk_table_attach(GTK_TABLE(table), clock_background, col, col+1, row, row+1, GTK_FILL, 0, 0, 0); col++; + gtk_tooltips_set_tip(tooltips, clock_background, "Selects the background used to display the clock. " + "Backgrounds can be edited in the Backgrounds tab.", NULL); row++, col = 2; label = gtk_label_new(_("Horizontal padding"));@@ -2956,6 +3193,8 @@ clock_padding_x = gtk_spin_button_new_with_range(0, 500, 1);
gtk_widget_show(clock_padding_x); gtk_table_attach(GTK_TABLE(table), clock_padding_x, col, col+1, row, row+1, GTK_FILL, 0, 0, 0); col++; + gtk_tooltips_set_tip(tooltips, clock_padding_x, "Specifies the horizontal padding of the clock. " + "This is the space between the border and the content inside.", NULL); row++, col = 2; label = gtk_label_new(_("Vertical padding"));@@ -2968,6 +3207,8 @@ clock_padding_y = gtk_spin_button_new_with_range(0, 500, 1);
gtk_widget_show(clock_padding_y); gtk_table_attach(GTK_TABLE(table), clock_padding_y, col, col+1, row, row+1, GTK_FILL, 0, 0, 0); col++; + gtk_tooltips_set_tip(tooltips, clock_padding_y, "Specifies the vertical padding of the clock. " + "This is the space between the border and the content inside.", NULL); row++, col = 2; label = gtk_label_new(_("Font first line"));@@ -2980,7 +3221,8 @@ clock_font_line1 = gtk_font_button_new();
gtk_widget_show(clock_font_line1); gtk_table_attach(GTK_TABLE(table), clock_font_line1, col, col+3, row, row+1, GTK_FILL, 0, 0, 0); col++; -// gtk_font_button_set_show_style(GTK_FONT_BUTTON(clock_font_line1), FALSE); + gtk_font_button_set_show_style(GTK_FONT_BUTTON(clock_font_line1), TRUE); + gtk_tooltips_set_tip(tooltips, clock_font_line1, "Specifies the font used to display the first line of the clock.", NULL); row++, col = 2; label = gtk_label_new(_("Font second line"));@@ -2993,7 +3235,8 @@ clock_font_line2 = gtk_font_button_new();
gtk_widget_show(clock_font_line2); gtk_table_attach(GTK_TABLE(table), clock_font_line2, col, col+3, row, row+1, GTK_FILL, 0, 0, 0); col++; -// gtk_font_button_set_show_style(GTK_FONT_BUTTON(clock_font_line2), FALSE); + gtk_font_button_set_show_style(GTK_FONT_BUTTON(clock_font_line2), TRUE); + gtk_tooltips_set_tip(tooltips, clock_font_line2, "Specifies the font used to display the second line of the clock.", NULL); row++, col = 2; label = gtk_label_new(_("Font color"));@@ -3007,6 +3250,7 @@ gtk_color_button_set_use_alpha(GTK_COLOR_BUTTON(clock_font_color), TRUE);
gtk_widget_show(clock_font_color); gtk_table_attach(GTK_TABLE(table), clock_font_color, col, col+1, row, row+1, GTK_FILL, 0, 0, 0); col++; + gtk_tooltips_set_tip(tooltips, clock_font_color, "Specifies the font color used to display the clock.", NULL); change_paragraph(parent);@@ -3034,6 +3278,8 @@ gtk_widget_show(clock_format_tooltip);
gtk_entry_set_width_chars(GTK_ENTRY(clock_format_tooltip), 30); gtk_table_attach(GTK_TABLE(table), clock_format_tooltip, col, col+1, row, row+1, GTK_FILL, 0, 0, 0); col++; + gtk_tooltips_set_tip(tooltips, clock_format_tooltip, "Specifies the format used to display the clock tooltip. " + "See 'man strftime' for the available options.", NULL); row++, col = 2; label = gtk_label_new(_("Timezone"));@@ -3047,6 +3293,8 @@ gtk_widget_show(clock_tmz_tooltip);
gtk_entry_set_width_chars(GTK_ENTRY(clock_tmz_tooltip), 16); gtk_table_attach(GTK_TABLE(table), clock_tmz_tooltip, col, col+1, row, row+1, GTK_FILL, 0, 0, 0); col++; + gtk_tooltips_set_tip(tooltips, clock_tmz_tooltip, "Specifies the timezone used to display the clock tooltip. If empty, the current timezone is used. " + "Otherwise, it must be set to a valid value of the TZ environment variable.", NULL); change_paragraph(parent); }@@ -3056,6 +3304,7 @@ {
GtkWidget *table; GtkWidget *label; int row, col; + GtkTooltips *tooltips = gtk_tooltips_new(); label = gtk_label_new(_("<b>Options</b>")); gtk_misc_set_alignment(GTK_MISC(label), 0, 0);@@ -3085,6 +3334,11 @@ gtk_combo_box_append_text(GTK_COMBO_BOX(systray_icon_order), _("Ascending"));
gtk_combo_box_append_text(GTK_COMBO_BOX(systray_icon_order), _("Descending")); gtk_combo_box_append_text(GTK_COMBO_BOX(systray_icon_order), _("Left to right")); gtk_combo_box_append_text(GTK_COMBO_BOX(systray_icon_order), _("Right to left")); + gtk_tooltips_set_tip(tooltips, systray_icon_order, "Specifies the order used to arrange the system tray icons. \n" + "'Ascending' means that icons are sorted in ascending order of their window names. \n" + "'Descending' means that icons are sorted in descending order of their window names. \n" + "'Left to right' means that icons are always added to the left. \n" + "'Right to left' means that icons are always added to the right.", NULL); row++; col = 2;@@ -3104,6 +3358,8 @@ gtk_combo_box_append_text(GTK_COMBO_BOX(systray_monitor), _("3"));
gtk_combo_box_append_text(GTK_COMBO_BOX(systray_monitor), _("4")); gtk_combo_box_append_text(GTK_COMBO_BOX(systray_monitor), _("5")); gtk_combo_box_append_text(GTK_COMBO_BOX(systray_monitor), _("6")); + gtk_tooltips_set_tip(tooltips, systray_monitor, "Specifies the monitor on which to place the system tray. " + "Due to technical limitations, the system tray cannot be displayed on multiple monitors.", NULL); change_paragraph(parent);@@ -3130,6 +3386,8 @@ systray_background = create_background_combo();
gtk_widget_show(systray_background); gtk_table_attach(GTK_TABLE(table), systray_background, col, col+1, row, row+1, GTK_FILL, 0, 0, 0); col++; + gtk_tooltips_set_tip(tooltips, systray_background, "Selects the background used to display the system tray. " + "Backgrounds can be edited in the Backgrounds tab.", NULL); row++; col = 2;@@ -3143,6 +3401,8 @@ systray_padding_x = gtk_spin_button_new_with_range(0, 500, 1);
gtk_widget_show(systray_padding_x); gtk_table_attach(GTK_TABLE(table), systray_padding_x, col, col+1, row, row+1, GTK_FILL, 0, 0, 0); col++; + gtk_tooltips_set_tip(tooltips, systray_padding_x, "Specifies the horizontal padding of the system tray. " + "This is the space between the border and the content inside.", NULL); row++; col = 2;@@ -3156,6 +3416,8 @@ systray_padding_y = gtk_spin_button_new_with_range(0, 500, 1);
gtk_widget_show(systray_padding_y); gtk_table_attach(GTK_TABLE(table), systray_padding_y, col, col+1, row, row+1, GTK_FILL, 0, 0, 0); col++; + gtk_tooltips_set_tip(tooltips, systray_padding_y, "Specifies the vertical padding of the system tray. " + "This is the space between the border and the content inside.", NULL); row++; col = 2;@@ -3169,6 +3431,7 @@ systray_spacing = gtk_spin_button_new_with_range(0, 500, 1);
gtk_widget_show(systray_spacing); gtk_table_attach(GTK_TABLE(table), systray_spacing, col, col+1, row, row+1, GTK_FILL, 0, 0, 0); col++; + gtk_tooltips_set_tip(tooltips, systray_spacing, "Specifies the spacing between system tray icons.", NULL); row++; col = 2;@@ -3182,6 +3445,7 @@ systray_icon_size = gtk_spin_button_new_with_range(0, 500, 1);
gtk_widget_show(systray_icon_size); gtk_table_attach(GTK_TABLE(table), systray_icon_size, col, col+1, row, row+1, GTK_FILL, 0, 0, 0); col++; + gtk_tooltips_set_tip(tooltips, systray_icon_size, "Specifies the size of the system tray icons, in pixels.", NULL); row++; col = 2;@@ -3195,6 +3459,7 @@ systray_icon_opacity = gtk_spin_button_new_with_range(0, 100, 1);
gtk_widget_show(systray_icon_opacity); gtk_table_attach(GTK_TABLE(table), systray_icon_opacity, col, col+1, row, row+1, GTK_FILL, 0, 0, 0); col++; + gtk_tooltips_set_tip(tooltips, systray_icon_opacity, "Specifies the opacity of the system tray icons, in percent.", NULL); row++; col = 2;@@ -3208,6 +3473,7 @@ systray_icon_saturation = gtk_spin_button_new_with_range(-100, 100, 1);
gtk_widget_show(systray_icon_saturation); gtk_table_attach(GTK_TABLE(table), systray_icon_saturation, col, col+1, row, row+1, GTK_FILL, 0, 0, 0); col++; + gtk_tooltips_set_tip(tooltips, systray_icon_saturation, "Specifies the saturation adjustment of the system tray icons, in percent.", NULL); row++; col = 2;@@ -3221,12 +3487,14 @@ systray_icon_brightness = gtk_spin_button_new_with_range(-100, 100, 1);
gtk_widget_show(systray_icon_brightness); gtk_table_attach(GTK_TABLE(table), systray_icon_brightness, col, col+1, row, row+1, GTK_FILL, 0, 0, 0); col++; + gtk_tooltips_set_tip(tooltips, systray_icon_brightness, "Specifies the brightness adjustment of the system tray icons, in percent.", NULL); } void create_battery(GtkWidget *parent) { GtkWidget *table, *label; int row, col; + GtkTooltips *tooltips = gtk_tooltips_new(); table = gtk_table_new(1, 2, FALSE); gtk_widget_show(table);@@ -3258,6 +3526,7 @@ battery_hide_if_higher = gtk_spin_button_new_with_range(0, 101, 1);
gtk_widget_show(battery_hide_if_higher); gtk_table_attach(GTK_TABLE(table), battery_hide_if_higher, col, col+1, row, row+1, GTK_FILL, 0, 0, 0); col++; + gtk_tooltips_set_tip(tooltips, battery_hide_if_higher, "Minimum battery level for which to hide the batter applet. Use 101 to always show the batter applet.", NULL); label = gtk_label_new(_("%")); gtk_misc_set_alignment(GTK_MISC(label), 0, 0);@@ -3276,6 +3545,7 @@ battery_alert_if_lower = gtk_spin_button_new_with_range(0, 100, 1);
gtk_widget_show(battery_alert_if_lower); gtk_table_attach(GTK_TABLE(table), battery_alert_if_lower, col, col+1, row, row+1, GTK_FILL, 0, 0, 0); col++; + gtk_tooltips_set_tip(tooltips, battery_alert_if_lower, "Battery level for which to display an alert.", NULL); label = gtk_label_new(_("%")); gtk_misc_set_alignment(GTK_MISC(label), 0, 0);@@ -3295,6 +3565,7 @@ gtk_widget_show(battery_alert_cmd);
gtk_entry_set_width_chars(GTK_ENTRY(battery_alert_cmd), 50); gtk_table_attach(GTK_TABLE(table), battery_alert_cmd, col, col+3, row, row+1, GTK_FILL, 0, 0, 0); col++; + gtk_tooltips_set_tip(tooltips, battery_alert_cmd, "Command to be executed when the alert threshold is reached.", NULL); change_paragraph(parent);@@ -3321,6 +3592,8 @@ battery_background = create_background_combo();
gtk_widget_show(battery_background); gtk_table_attach(GTK_TABLE(table), battery_background, col, col+1, row, row+1, GTK_FILL, 0, 0, 0); col++; + gtk_tooltips_set_tip(tooltips, battery_background, "Selects the background used to display the battery. " + "Backgrounds can be edited in the Backgrounds tab.", NULL); row++, col = 2; label = gtk_label_new(_("Horizontal padding"));@@ -3333,6 +3606,8 @@ battery_padding_x = gtk_spin_button_new_with_range(0, 500, 1);
gtk_widget_show(battery_padding_x); gtk_table_attach(GTK_TABLE(table), battery_padding_x, col, col+1, row, row+1, GTK_FILL, 0, 0, 0); col++; + gtk_tooltips_set_tip(tooltips, battery_padding_x, "Specifies the horizontal padding of the battery. " + "This is the space between the border and the content inside.", NULL); row++, col = 2; label = gtk_label_new(_("Vertical padding"));@@ -3345,6 +3620,8 @@ battery_padding_y = gtk_spin_button_new_with_range(0, 500, 1);
gtk_widget_show(battery_padding_y); gtk_table_attach(GTK_TABLE(table), battery_padding_y, col, col+1, row, row+1, GTK_FILL, 0, 0, 0); col++; + gtk_tooltips_set_tip(tooltips, battery_padding_y, "Specifies the vertical padding of the battery. " + "This is the space between the border and the content inside.", NULL); row++, col = 2; label = gtk_label_new(_("Font first line"));@@ -3357,7 +3634,8 @@ battery_font_line1 = gtk_font_button_new();
gtk_widget_show(battery_font_line1); gtk_table_attach(GTK_TABLE(table), battery_font_line1, col, col+3, row, row+1, GTK_FILL, 0, 0, 0); col++; -// gtk_font_button_set_show_style(GTK_FONT_BUTTON(battery_font_line1), FALSE); + gtk_font_button_set_show_style(GTK_FONT_BUTTON(battery_font_line1), TRUE); + gtk_tooltips_set_tip(tooltips, battery_font_line1, "Specifies the font used to display the first line of the battery text.", NULL); row++, col = 2; label = gtk_label_new(_("Font second line"));@@ -3370,7 +3648,8 @@ battery_font_line2 = gtk_font_button_new();
gtk_widget_show(battery_font_line2); gtk_table_attach(GTK_TABLE(table), battery_font_line2, col, col+3, row, row+1, GTK_FILL, 0, 0, 0); col++; -// gtk_font_button_set_show_style(GTK_FONT_BUTTON(battery_font_line2), FALSE); + gtk_font_button_set_show_style(GTK_FONT_BUTTON(battery_font_line2), TRUE); + gtk_tooltips_set_tip(tooltips, battery_font_line2, "Specifies the font used to display the second line of the battery text.", NULL); row++, col = 2; label = gtk_label_new(_("Font color"));@@ -3384,6 +3663,7 @@ gtk_color_button_set_use_alpha(GTK_COLOR_BUTTON(battery_font_color), TRUE);
gtk_widget_show(battery_font_color); gtk_table_attach(GTK_TABLE(table), battery_font_color, col, col+1, row, row+1, GTK_FILL, 0, 0, 0); col++; + gtk_tooltips_set_tip(tooltips, battery_font_color, "Specifies the font clor used to display the battery text.", NULL); change_paragraph(parent); }@@ -3393,6 +3673,7 @@ {
GtkWidget *table; GtkWidget *label; int row, col; + GtkTooltips *tooltips = gtk_tooltips_new(); label = gtk_label_new(_("<b>Timing</b>")); gtk_misc_set_alignment(GTK_MISC(label), 0, 0);@@ -3417,6 +3698,7 @@ tooltip_show_after = gtk_spin_button_new_with_range(0, 10000, 0.1);
gtk_widget_show(tooltip_show_after); gtk_table_attach(GTK_TABLE(table), tooltip_show_after, col, col+1, row, row+1, GTK_FILL, 0, 0, 0); col++; + gtk_tooltips_set_tip(tooltips, tooltip_show_after, "Specifies a delay after which to show the tooltip when moving the mouse over an element.", NULL); label = gtk_label_new(_("seconds")); gtk_misc_set_alignment(GTK_MISC(label), 0, 0);@@ -3434,6 +3716,7 @@
tooltip_hide_after = gtk_spin_button_new_with_range(0, 10000, 0.1); gtk_widget_show(tooltip_hide_after); gtk_table_attach(GTK_TABLE(table), tooltip_hide_after, col, col+1, row, row+1, GTK_FILL, 0, 0, 0); + gtk_tooltips_set_tip(tooltips, tooltip_hide_after, "Specifies a delay after which to hide the tooltip when moving the mouse outside an element.", NULL); col++; label = gtk_label_new(_("seconds"));@@ -3467,6 +3750,8 @@ tooltip_background = create_background_combo();
gtk_widget_show(tooltip_background); gtk_table_attach(GTK_TABLE(table), tooltip_background, col, col+1, row, row+1, GTK_FILL, 0, 0, 0); col++; + gtk_tooltips_set_tip(tooltips, tooltip_background, "Selects the background used to display the tooltip. " + "Backgrounds can be edited in the Backgrounds tab.", NULL); row++, col = 2; label = gtk_label_new(_("Horizontal padding"));@@ -3479,6 +3764,8 @@ tooltip_padding_x = gtk_spin_button_new_with_range(0, 500, 1);
gtk_widget_show(tooltip_padding_x); gtk_table_attach(GTK_TABLE(table), tooltip_padding_x, col, col+1, row, row+1, GTK_FILL, 0, 0, 0); col++; + gtk_tooltips_set_tip(tooltips, tooltip_padding_x, "Specifies the horizontal padding of the tooltip. " + "This is the space between the border and the content inside.", NULL); row++, col = 2; label = gtk_label_new(_("Vertical padding"));@@ -3491,6 +3778,8 @@ tooltip_padding_y = gtk_spin_button_new_with_range(0, 500, 1);
gtk_widget_show(tooltip_padding_y); gtk_table_attach(GTK_TABLE(table), tooltip_padding_y, col, col+1, row, row+1, GTK_FILL, 0, 0, 0); col++; + gtk_tooltips_set_tip(tooltips, tooltip_padding_y, "Specifies the vertical padding of the tooltip. " + "This is the space between the border and the content inside.", NULL); row++, col = 2; label = gtk_label_new(_("Font"));@@ -3503,7 +3792,8 @@ tooltip_font = gtk_font_button_new();
gtk_widget_show(tooltip_font); gtk_table_attach(GTK_TABLE(table), tooltip_font, col, col+3, row, row+1, GTK_FILL, 0, 0, 0); col++; -// gtk_font_button_set_show_style(GTK_FONT_BUTTON(tooltip_font), FALSE); + gtk_font_button_set_show_style(GTK_FONT_BUTTON(tooltip_font), TRUE); + gtk_tooltips_set_tip(tooltips, tooltip_font, "Specifies the font used to display the text of the tooltip.", NULL); row++, col = 2; label = gtk_label_new(_("Font color"));@@ -3517,6 +3807,7 @@ gtk_color_button_set_use_alpha(GTK_COLOR_BUTTON(tooltip_font_color), TRUE);
gtk_widget_show(tooltip_font_color); gtk_table_attach(GTK_TABLE(table), tooltip_font_color, col, col+1, row, row+1, GTK_FILL, 0, 0, 0); col++; + gtk_tooltips_set_tip(tooltips, tooltip_font_color, "Specifies the font color used to display the text of the tooltip.", NULL); change_paragraph(parent); }