taskbar_hide_different_desktop

This commit is contained in:
o9000
2017-06-20 05:06:37 +02:00
parent 2dfcab170d
commit d55f6d7baa
10 changed files with 47 additions and 3 deletions

View File

@@ -44,7 +44,7 @@ GtkWidget *notebook;
// taskbar
GtkWidget *taskbar_show_desktop, *taskbar_show_name, *taskbar_padding_x, *taskbar_padding_y, *taskbar_spacing;
GtkWidget *taskbar_hide_inactive_tasks, *taskbar_hide_diff_monitor;
GtkWidget *taskbar_hide_inactive_tasks, *taskbar_hide_diff_monitor, *taskbar_hide_diff_desktop;
GtkWidget *taskbar_name_padding_x, *taskbar_name_padding_y, *taskbar_name_inactive_color, *taskbar_name_active_color;
GtkWidget *taskbar_name_font, *taskbar_name_font_set;
GtkWidget *taskbar_active_background, *taskbar_inactive_background;
@@ -2651,6 +2651,19 @@ void create_taskbar(GtkWidget *parent)
"This behavior is enabled automatically if the panel monitor is set to 'All'."),
NULL);
col = 2;
row++;
label = gtk_label_new(_("Hide tasks from different desktops"));
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_hide_diff_desktop = gtk_check_button_new();
gtk_widget_show(taskbar_hide_diff_desktop);
gtk_table_attach(GTK_TABLE(table), taskbar_hide_diff_desktop, col, col + 1, row, row + 1, GTK_FILL, 0, 0, 0);
col++;
col = 2;
row++;
label = gtk_label_new(_("Always show all desktop tasks"));

View File

@@ -49,7 +49,7 @@ extern GtkWidget *panel_background;
// taskbar
extern GtkWidget *taskbar_show_desktop, *taskbar_show_name, *taskbar_padding_x, *taskbar_padding_y, *taskbar_spacing;
extern GtkWidget *taskbar_hide_inactive_tasks, *taskbar_hide_diff_monitor;
extern GtkWidget *taskbar_hide_inactive_tasks, *taskbar_hide_diff_monitor, *taskbar_hide_diff_desktop;
extern GtkWidget *taskbar_name_padding_x, *taskbar_name_padding_y, *taskbar_name_inactive_color,
*taskbar_name_active_color;
extern GtkWidget *taskbar_name_font, *taskbar_name_font_set;

View File

@@ -401,6 +401,9 @@ void config_write_taskbar(FILE *fp)
fprintf(fp,
"taskbar_hide_different_monitor = %d\n",
gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(taskbar_hide_diff_monitor)) ? 1 : 0);
fprintf(fp,
"taskbar_hide_different_desktop = %d\n",
gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(taskbar_hide_diff_desktop)) ? 1 : 0);
fprintf(fp,
"taskbar_always_show_all_desktop_tasks = %d\n",
gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(taskbar_always_show_all_desktop_tasks)) ? 1 : 0);
@@ -1551,6 +1554,8 @@ void add_entry(char *key, char *value)
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(taskbar_hide_inactive_tasks), atoi(value));
} else if (strcmp(key, "taskbar_hide_different_monitor") == 0) {
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(taskbar_hide_diff_monitor), atoi(value));
} else if (strcmp(key, "taskbar_hide_different_desktop") == 0) {
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(taskbar_hide_diff_desktop), atoi(value));
} else if (strcmp(key, "taskbar_always_show_all_desktop_tasks") == 0) {
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(taskbar_always_show_all_desktop_tasks), atoi(value));
} else if (strcmp(key, "taskbar_name_padding") == 0) {