all repos — tint2 @ e833b275331941fa023b8d0c2be7afd3a9c36542

fork of the tint2 desktop panel for my custom setup - only minimized windows across all desktops for the taskbar

tint2conf: disable buttons for gradient/background 0
o9000 mrovi9000@gmail.com
commit

e833b275331941fa023b8d0c2be7afd3a9c36542

parent

d17b2d8015828dabf8c4ef3a4470de4855d5ca1b

3 files changed, 29 insertions(+), 3 deletions(-)

jump to
M src/systray/systraybar.csrc/systray/systraybar.c

@@ -586,7 +586,7 @@ }

gboolean reject_icon(Window win) { - if (systray_hide_name_filter) { + if (systray_hide_name_filter && strlen(systray_hide_name_filter)) { if (!systray_hide_name_regex) { systray_hide_name_regex = (regex_t *) calloc(1, sizeof(*systray_hide_name_regex)); if (regcomp(systray_hide_name_regex, systray_hide_name_filter, 0) != 0) {
M src/tint2conf/background_gui.csrc/tint2conf/background_gui.c

@@ -846,6 +846,23 @@ int index = gtk_combo_box_get_active(GTK_COMBO_BOX(current_background));

if (index < 0) return; + gtk_widget_set_sensitive(gradient_combo_type, index > 0); + gtk_widget_set_sensitive(background_fill_color, index > 0); + gtk_widget_set_sensitive(background_border_color, index > 0); + gtk_widget_set_sensitive(background_gradient, index > 0); + gtk_widget_set_sensitive(background_fill_color_over, index > 0); + gtk_widget_set_sensitive(background_border_color_over, index > 0); + gtk_widget_set_sensitive(background_gradient_over, index > 0); + gtk_widget_set_sensitive(background_fill_color_press, index > 0); + gtk_widget_set_sensitive(background_border_color_press, index > 0); + gtk_widget_set_sensitive(background_gradient_press, index > 0); + gtk_widget_set_sensitive(background_border_width, index > 0); + gtk_widget_set_sensitive(background_border_sides_top, index > 0); + gtk_widget_set_sensitive(background_border_sides_bottom, index > 0); + gtk_widget_set_sensitive(background_border_sides_left, index > 0); + gtk_widget_set_sensitive(background_border_sides_right, index > 0); + gtk_widget_set_sensitive(background_corner_radius, index > 0); + background_updates_disabled = TRUE; GtkTreePath *path;
M src/tint2conf/gradient_gui.csrc/tint2conf/gradient_gui.c

@@ -208,7 +208,7 @@ gtk_list_store_append(gradient_ids, &iter);

gtk_list_store_set(gradient_ids, &iter, grColPixbuf, NULL, grColId, &index, - grColText, "", + grColText, index == 0 ? _("None") : "", -1); gradient_update_image(index);

@@ -239,6 +239,8 @@ int index = get_model_length(GTK_TREE_MODEL(gradient_ids));

GradientConfig *g = (GradientConfig *)calloc(1, sizeof(GradientConfig)); g->type = g_old->type; + g->start_color = g_old->start_color; + g->end_color = g_old->end_color; g->extra_color_stops = g_list_copy_deep(g->extra_color_stops, copy_GradientConfigColorStop, NULL); gradients = g_list_append(gradients, g); GtkTreeIter iter;

@@ -352,7 +354,7 @@ {

if (gradient_updates_disabled) return; int index = gtk_combo_box_get_active(GTK_COMBO_BOX(current_gradient)); - if (index < 0) + if (index <= 0) return; GtkTreePath *path;

@@ -393,6 +395,13 @@ {

int index = gtk_combo_box_get_active(GTK_COMBO_BOX(current_gradient)); if (index < 0) return; + + gtk_widget_set_sensitive(gradient_combo_type, index > 0); + gtk_widget_set_sensitive(gradient_start_color, index > 0); + gtk_widget_set_sensitive(gradient_end_color, index > 0); + gtk_widget_set_sensitive(current_gradient_stop, index > 0); + gtk_widget_set_sensitive(gradient_stop_color, index > 0); + gtk_widget_set_sensitive(gradient_stop_offset, index > 0); gradient_updates_disabled = TRUE;