tint2conf: Multiple fixes

This commit is contained in:
o9000 2015-04-26 14:42:20 +02:00
parent 298f60f1b0
commit e6612d2893
4 changed files with 138 additions and 21 deletions

View file

@ -69,6 +69,7 @@ static void refresh_current_theme();
static void menuAbout();
static gboolean view_onPopupMenu(GtkWidget *treeview, gpointer userdata);
static gboolean view_onButtonPressed(GtkWidget *treeview, GdkEventButton *event, gpointer userdata);
static void viewRowActivated(GtkTreeView *tree_view, GtkTreePath *path, GtkTreeViewColumn *column, gpointer user_data);
static gboolean theme_selected(GtkTreeSelection *selection,
GtkTreeModel *model,
GtkTreePath *path,
@ -204,6 +205,7 @@ int main(int argc, char **argv)
gtk_widget_show(g_theme_view);
g_signal_connect(g_theme_view, "button-press-event", (GCallback)view_onButtonPressed, NULL);
g_signal_connect(g_theme_view, "popup-menu", (GCallback)view_onPopupMenu, NULL);
g_signal_connect(g_theme_view, "row-activated", G_CALLBACK(viewRowActivated), NULL);
gtk_tree_selection_set_select_function(gtk_tree_view_get_selection(GTK_TREE_VIEW(g_theme_view)), theme_selected, NULL, NULL);
// load themes
@ -244,6 +246,7 @@ static void menuImport()
{
GtkWidget *dialog = gtk_file_chooser_dialog_new(_("Import theme(s)"), GTK_WINDOW(g_window), GTK_FILE_CHOOSER_ACTION_OPEN, GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, GTK_STOCK_ADD, GTK_RESPONSE_ACCEPT, NULL);
GtkFileChooser *chooser = GTK_FILE_CHOOSER(dialog);
gtk_file_chooser_set_select_multiple(chooser, TRUE);
if (gtk_dialog_run(GTK_DIALOG(dialog)) != GTK_RESPONSE_ACCEPT) {
gtk_widget_destroy(dialog);
@ -476,6 +479,11 @@ static void edit_current_theme()
}
}
static void viewRowActivated(GtkTreeView *tree_view, GtkTreePath *path, GtkTreeViewColumn *column, gpointer user_data)
{
edit_current_theme();
}
// ====== Theme load/reload ======
static void load_all_themes()

View file

@ -109,6 +109,7 @@ GtkWidget *launcher_apps_view, *all_apps_view;
GtkWidget *launcher_apps_dirs;
GtkWidget *launcher_icon_size, *launcher_icon_theme, *launcher_padding_x, *launcher_padding_y, *launcher_spacing;
GtkWidget *launcher_icon_opacity, *launcher_icon_saturation, *launcher_icon_brightness;
GtkWidget *margin_x, *margin_y;
GtkWidget *launcher_background;
GtkWidget *startup_notifications;
@ -700,9 +701,9 @@ void background_update(GtkWidget *widget, gpointer data)
r = gtk_spin_button_get_value(GTK_SPIN_BUTTON(background_corner_radius));
b = gtk_spin_button_get_value(GTK_SPIN_BUTTON(background_border_width));
gtk_color_button_get_color(GTK_COLOR_BUTTON(background_fill_color), &fillColor);
fillOpacity = gtk_color_button_get_alpha(GTK_COLOR_BUTTON(background_fill_color)) * 100 / 0xffff;
fillOpacity = MIN(100, 0.5 + gtk_color_button_get_alpha(GTK_COLOR_BUTTON(background_fill_color)) * 100.0 / 0xffff);
gtk_color_button_get_color(GTK_COLOR_BUTTON(background_border_color), &borderColor);
borderOpacity = gtk_color_button_get_alpha(GTK_COLOR_BUTTON(background_border_color)) * 100 / 0xffff;
borderOpacity = MIN(100, 0.5 + gtk_color_button_get_alpha(GTK_COLOR_BUTTON(background_border_color)) * 100.0 / 0xffff);
gtk_list_store_set(backgrounds, &iter,
bgColPixbuf, NULL,
@ -846,6 +847,7 @@ void create_panel(GtkWidget *parent)
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_combo_box_set_active(GTK_COMBO_BOX(panel_combo_monitor), 0);
gtk_tooltips_set_tip(tooltips, panel_combo_monitor, "The monitor on which the panel is placed", NULL);
row++;
@ -868,6 +870,7 @@ void create_panel(GtkWidget *parent)
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_combo_box_set_active(GTK_COMBO_BOX(panel_combo_width_type), 0);
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++;
@ -890,6 +893,7 @@ void create_panel(GtkWidget *parent)
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_combo_box_set_active(GTK_COMBO_BOX(panel_combo_height_type), 0);
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++;
@ -1171,6 +1175,7 @@ void create_panel(GtkWidget *parent)
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_combo_box_set_active(GTK_COMBO_BOX(panel_combo_layer), 1);
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"
@ -1192,6 +1197,7 @@ void create_panel(GtkWidget *parent)
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_combo_box_set_active(GTK_COMBO_BOX(panel_combo_strut_policy), 0);
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; "
@ -1739,6 +1745,14 @@ void load_desktop_file(const char *file, gboolean selected)
g_object_unref(pixbuf);
} else {
printf("Could not load %s\n", file);
GtkTreeIter iter;
gtk_list_store_append(selected ? launcher_apps : all_apps, &iter);
gtk_list_store_set(selected ? launcher_apps :all_apps, &iter,
appsColIcon, NULL,
appsColText, g_strdup(file),
appsColPath, g_strdup(file),
appsColIconName, g_strdup(""),
-1);
}
free_desktop_entry(&entry);
}
@ -2078,6 +2092,48 @@ void create_launcher(GtkWidget *parent)
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 opacity"));
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++;
launcher_icon_opacity = gtk_spin_button_new_with_range(0, 100, 1);
gtk_widget_show(launcher_icon_opacity);
gtk_table_attach(GTK_TABLE(table), launcher_icon_opacity, col, col+1, row, row+1, GTK_FILL, 0, 0, 0);
col++;
gtk_tooltips_set_tip(tooltips, launcher_icon_opacity, "Specifies the opacity of the launcher icons, in percent.", NULL);
row++;
col = 2;
label = gtk_label_new(_("Icon saturation"));
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++;
launcher_icon_saturation = gtk_spin_button_new_with_range(-100, 100, 1);
gtk_widget_show(launcher_icon_saturation);
gtk_table_attach(GTK_TABLE(table), launcher_icon_saturation, col, col+1, row, row+1, GTK_FILL, 0, 0, 0);
col++;
gtk_tooltips_set_tip(tooltips, launcher_icon_saturation, "Specifies the saturation adjustment of the launcher icons, in percent.", NULL);
row++;
col = 2;
label = gtk_label_new(_("Icon brightness"));
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++;
launcher_icon_brightness = gtk_spin_button_new_with_range(-100, 100, 1);
gtk_widget_show(launcher_icon_brightness);
gtk_table_attach(GTK_TABLE(table), launcher_icon_brightness, col, col+1, row, row+1, GTK_FILL, 0, 0, 0);
col++;
gtk_tooltips_set_tip(tooltips, launcher_icon_brightness, "Specifies the brightness adjustment of the launcher icons, in percent.", NULL);
row++, col = 2;
label = gtk_label_new(_("Icon theme"));
gtk_misc_set_alignment(GTK_MISC(label), 0, 0);
@ -2244,6 +2300,7 @@ void create_taskbar(GtkWidget *parent)
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_combo_box_set_active(GTK_COMBO_BOX(taskbar_sort_order), 0);
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"
@ -2514,6 +2571,7 @@ void create_task(GtkWidget *parent)
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_combo_box_set_active(GTK_COMBO_BOX(task_mouse_left), 5);
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"
@ -2549,6 +2607,7 @@ void create_task(GtkWidget *parent)
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_combo_box_set_active(GTK_COMBO_BOX(task_mouse_scroll_up), 0);
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"
@ -2584,6 +2643,7 @@ void create_task(GtkWidget *parent)
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_combo_box_set_active(GTK_COMBO_BOX(task_mouse_middle), 0);
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"
@ -2619,6 +2679,7 @@ void create_task(GtkWidget *parent)
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_combo_box_set_active(GTK_COMBO_BOX(task_mouse_scroll_down), 0);
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"
@ -2654,6 +2715,7 @@ void create_task(GtkWidget *parent)
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_combo_box_set_active(GTK_COMBO_BOX(task_mouse_right), 1);
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"
@ -3348,6 +3410,7 @@ void create_systemtray(GtkWidget *parent)
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_combo_box_set_active(GTK_COMBO_BOX(systray_icon_order), 0);
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"
@ -3372,6 +3435,7 @@ void create_systemtray(GtkWidget *parent)
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_combo_box_set_active(GTK_COMBO_BOX(systray_monitor), 0);
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);

View file

@ -121,6 +121,7 @@ extern GtkWidget *launcher_apps_view, *all_apps_view;
extern GtkWidget *launcher_apps_dirs;
extern GtkWidget *launcher_icon_size, *launcher_icon_theme, *launcher_padding_x, *launcher_padding_y, *launcher_spacing;
extern GtkWidget *launcher_icon_opacity, *launcher_icon_saturation, *launcher_icon_brightness;
extern GtkWidget *margin_x, *margin_y;
extern GtkWidget *launcher_background;
extern GtkWidget *startup_notifications;

View file

@ -11,7 +11,8 @@
void add_entry(char *key, char *value);
void hex2gdk(char *hex, GdkColor *color);
void get_action(char *event, GtkWidget *combo);
void set_action(char *event, GtkWidget *combo);
char *get_action(GtkWidget *combo);
int config_has_panel_items;
int config_has_battery;
@ -119,7 +120,7 @@ void config_write_backgrounds(FILE *fp)
bgColBorderWidth, &b,
bgColCornerRadius, &r,
-1);
fprintf(fp, "#%d\n", index + 1);
fprintf(fp, "# Background %d\n", index);
fprintf(fp, "rounded = %d\n", r);
fprintf(fp, "border_width = %d\n", b);
config_write_color(fp, "background_color", *fillColor, fillOpacity);
@ -396,6 +397,13 @@ void config_write_task(FILE *fp)
config_write_task_background(fp, "_iconified", task_iconified_background);
}
fprintf(fp, "mouse_left = %s\n", get_action(task_mouse_left));
fprintf(fp, "mouse_middle = %s\n", get_action(task_mouse_middle));
fprintf(fp, "mouse_right = %s\n", get_action(task_mouse_right));
fprintf(fp, "mouse_scroll_up = %s\n", get_action(task_mouse_scroll_up));
fprintf(fp, "mouse_scroll_down = %s\n", get_action(task_mouse_scroll_down));
fprintf(fp, "\n");
}
@ -431,7 +439,7 @@ void config_write_systray(FILE *fp)
(int)gtk_spin_button_get_value(GTK_SPIN_BUTTON(systray_icon_brightness)));
fprintf(fp, "systray_monitor = ");
fprintf(fp, "%d", gtk_combo_box_get_active(GTK_COMBO_BOX(systray_monitor)));
fprintf(fp, "%d", MAX(1, 1 + gtk_combo_box_get_active(GTK_COMBO_BOX(systray_monitor))));
fprintf(fp, "\n");
fprintf(fp, "\n");
@ -449,6 +457,11 @@ void config_write_launcher(FILE *fp)
(int)gtk_spin_button_get_value(GTK_SPIN_BUTTON(launcher_spacing)));
fprintf(fp, "launcher_background_id = %d\n", gtk_combo_box_get_active(GTK_COMBO_BOX(launcher_background)));
fprintf(fp, "launcher_icon_size = %d\n", (int)gtk_spin_button_get_value(GTK_SPIN_BUTTON(launcher_icon_size)));
fprintf(fp,
"launcher_icon_asb = %d %d %d\n",
(int)gtk_spin_button_get_value(GTK_SPIN_BUTTON(launcher_icon_opacity)),
(int)gtk_spin_button_get_value(GTK_SPIN_BUTTON(launcher_icon_saturation)),
(int)gtk_spin_button_get_value(GTK_SPIN_BUTTON(launcher_icon_brightness)));
gchar *icon_theme = get_current_icon_theme();
if (icon_theme && !g_str_equal(icon_theme, "")) {
fprintf(fp, "launcher_icon_theme = %s\n", icon_theme);
@ -518,7 +531,7 @@ void config_write_clock(FILE *fp)
fprintf(fp,
"clock_padding = %d %d\n",
(int)gtk_spin_button_get_value(GTK_SPIN_BUTTON(clock_padding_x)),
(int)gtk_spin_button_get_value(GTK_SPIN_BUTTON(clock_padding_x)));
(int)gtk_spin_button_get_value(GTK_SPIN_BUTTON(clock_padding_y)));
fprintf(fp, "clock_background_id = %d\n", gtk_combo_box_get_active(GTK_COMBO_BOX(clock_background)));
fprintf(fp, "clock_tooltip = %s\n", gtk_entry_get_text(GTK_ENTRY(clock_format_tooltip)));
fprintf(fp, "clock_tooltip_timezone = %s\n", gtk_entry_get_text(GTK_ENTRY(clock_tmz_tooltip)));
@ -1213,20 +1226,18 @@ void add_entry(char *key, char *value)
gtk_spin_button_set_value(GTK_SPIN_BUTTON(systray_icon_size), atoi(value));
}
else if (strcmp(key, "systray_monitor") == 0) {
if (strcmp(value, "0") == 0)
gtk_combo_box_set_active(GTK_COMBO_BOX(systray_monitor), 1);
else if (strcmp(value, "1") == 0)
gtk_combo_box_set_active(GTK_COMBO_BOX(systray_monitor), 2);
if (strcmp(value, "1") == 0)
gtk_combo_box_set_active(GTK_COMBO_BOX(systray_monitor), 0);
else if (strcmp(value, "2") == 0)
gtk_combo_box_set_active(GTK_COMBO_BOX(systray_monitor), 3);
gtk_combo_box_set_active(GTK_COMBO_BOX(systray_monitor), 1);
else if (strcmp(value, "3") == 0)
gtk_combo_box_set_active(GTK_COMBO_BOX(systray_monitor), 4);
gtk_combo_box_set_active(GTK_COMBO_BOX(systray_monitor), 2);
else if (strcmp(value, "4") == 0)
gtk_combo_box_set_active(GTK_COMBO_BOX(systray_monitor), 5);
gtk_combo_box_set_active(GTK_COMBO_BOX(systray_monitor), 3);
else if (strcmp(value, "5") == 0)
gtk_combo_box_set_active(GTK_COMBO_BOX(systray_monitor), 6);
gtk_combo_box_set_active(GTK_COMBO_BOX(systray_monitor), 4);
else if (strcmp(value, "6") == 0)
gtk_combo_box_set_active(GTK_COMBO_BOX(systray_monitor), 7);
gtk_combo_box_set_active(GTK_COMBO_BOX(systray_monitor), 5);
}
else if (strcmp(key, "systray_icon_asb") == 0) {
extract_values(value, &value1, &value2, &value3);
@ -1275,6 +1286,12 @@ void add_entry(char *key, char *value)
else if (strcmp(key, "startup_notifications") == 0) {
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(startup_notifications), atoi(value));
}
else if (strcmp(key, "launcher_icon_asb") == 0) {
extract_values(value, &value1, &value2, &value3);
gtk_spin_button_set_value(GTK_SPIN_BUTTON(launcher_icon_opacity), atoi(value1));
gtk_spin_button_set_value(GTK_SPIN_BUTTON(launcher_icon_saturation), atoi(value2));
gtk_spin_button_set_value(GTK_SPIN_BUTTON(launcher_icon_brightness), atoi(value3));
}
/* Tooltip */
else if (strcmp(key, "tooltip_show_timeout") == 0) {
@ -1308,19 +1325,19 @@ void add_entry(char *key, char *value)
/* Mouse actions */
else if (strcmp(key, "mouse_left") == 0) {
get_action(value, task_mouse_left);
set_action(value, task_mouse_left);
}
else if (strcmp(key, "mouse_middle") == 0) {
get_action(value, task_mouse_middle);
set_action(value, task_mouse_middle);
}
else if (strcmp(key, "mouse_right") == 0) {
get_action(value, task_mouse_right);
set_action(value, task_mouse_right);
}
else if (strcmp(key, "mouse_scroll_up") == 0) {
get_action(value, task_mouse_scroll_up);
set_action(value, task_mouse_scroll_up);
}
else if (strcmp(key, "mouse_scroll_down") == 0) {
get_action(value, task_mouse_scroll_down);
set_action(value, task_mouse_scroll_down);
}
if (value1) free(value1);
@ -1338,7 +1355,7 @@ void hex2gdk(char *hex, GdkColor *color)
color->pixel = 0;
}
void get_action(char *event, GtkWidget *combo)
void set_action(char *event, GtkWidget *combo)
{
if (strcmp(event, "none") == 0)
gtk_combo_box_set_active(GTK_COMBO_BOX(combo), 0);
@ -1363,3 +1380,30 @@ void get_action(char *event, GtkWidget *combo)
else if (strcmp(event, "prev_task") == 0)
gtk_combo_box_set_active(GTK_COMBO_BOX(combo), 10);
}
char *get_action(GtkWidget *combo)
{
if (gtk_combo_box_get_active(GTK_COMBO_BOX(combo)) == 0)
return "none";
if (gtk_combo_box_get_active(GTK_COMBO_BOX(combo)) == 1)
return "close";
if (gtk_combo_box_get_active(GTK_COMBO_BOX(combo)) == 2)
return "toggle";
if (gtk_combo_box_get_active(GTK_COMBO_BOX(combo)) == 3)
return "iconify";
if (gtk_combo_box_get_active(GTK_COMBO_BOX(combo)) == 4)
return "shade";
if (gtk_combo_box_get_active(GTK_COMBO_BOX(combo)) == 5)
return "toggle_iconify";
if (gtk_combo_box_get_active(GTK_COMBO_BOX(combo)) == 6)
return "maximize_restore";
if (gtk_combo_box_get_active(GTK_COMBO_BOX(combo)) == 7)
return "desktop_left";
if (gtk_combo_box_get_active(GTK_COMBO_BOX(combo)) == 8)
return "desktop_right";
if (gtk_combo_box_get_active(GTK_COMBO_BOX(combo)) == 9)
return "next_task";
if (gtk_combo_box_get_active(GTK_COMBO_BOX(combo)) == 10)
return "prev_task";
return "none";
}