static void slab_section_set_title_color (GtkWidget * widget) { GtkStyle *style; style = gtk_widget_get_style (widget); switch (SLAB_SECTION (widget)->style) { case Style1: gtk_widget_modify_fg (SLAB_SECTION (widget)->title, GTK_STATE_NORMAL, &style->bg[GTK_STATE_SELECTED]); break; case Style2: if (SLAB_SECTION (widget)->selected) gtk_widget_modify_fg (SLAB_SECTION (widget)->title, GTK_STATE_NORMAL, &style->dark[GTK_STATE_SELECTED]); else gtk_widget_modify_fg (SLAB_SECTION (widget)->title, GTK_STATE_NORMAL, &style->text[GTK_STATE_INSENSITIVE]); break; default: g_assert_not_reached (); } }
static UniqueResponse message_received_cb(UniqueApp* app, UniqueCommand command, UniqueMessageData* message, guint time, gpointer user_data) { UniqueResponse res; AppShellData* app_data = user_data; switch (command) { case UNIQUE_ACTIVATE: /* move the main window to the screen that sent us the command */ gtk_window_set_screen(GTK_WINDOW(app_data->main_app), unique_message_data_get_screen(message)); if (!app_data->main_app_window_shown_once) { show_shell(app_data); } gtk_window_present_with_time(GTK_WINDOW(app_data->main_app), time); gtk_widget_grab_focus(SLAB_SECTION(app_data->filter_section)->contents); res = UNIQUE_RESPONSE_OK; break; default: res = UNIQUE_RESPONSE_PASSTHROUGH; break; } return res; }