static void on_toolbar_style_changed (GSettings* settings, const gchar* key, gpointer user_data) { AnjutaWindow* win = ANJUTA_WINDOW (user_data); gchar* tb_style = g_settings_get_string (settings, key); if (strcasecmp (tb_style, "Default") == 0) style = -1; else if (strcasecmp (tb_style, "Both") == 0) style = GTK_TOOLBAR_BOTH; else if (strcasecmp (tb_style, "Horiz") == 0) style = GTK_TOOLBAR_BOTH_HORIZ; else if (strcasecmp (tb_style, "Icons") == 0) style = GTK_TOOLBAR_ICONS; else if (strcasecmp (tb_style, "Text") == 0) style = GTK_TOOLBAR_TEXT; if (style != -1) { gtk_toolbar_set_style (GTK_TOOLBAR (win->toolbar), style); } else { gtk_toolbar_unset_style (GTK_TOOLBAR (win->toolbar)); } g_free (tb_style); }
static void on_toolbar_style_changed (AnjutaPreferences* prefs, const gchar* key, const gchar* tb_style, gpointer user_data) { AnjutaApp* app = ANJUTA_APP (user_data); if (tb_style) { if (strcasecmp (tb_style, "Default") == 0) style = -1; else if (strcasecmp (tb_style, "Both") == 0) style = GTK_TOOLBAR_BOTH; else if (strcasecmp (tb_style, "Horiz") == 0) style = GTK_TOOLBAR_BOTH_HORIZ; else if (strcasecmp (tb_style, "Icons") == 0) style = GTK_TOOLBAR_ICONS; else if (strcasecmp (tb_style, "Text") == 0) style = GTK_TOOLBAR_TEXT; DEBUG_PRINT ("Toolbar style: %s", tb_style); } if (style != -1) { gtk_toolbar_set_style (GTK_TOOLBAR (app->toolbar), style); } else { gtk_toolbar_unset_style (GTK_TOOLBAR (app->toolbar)); } }
static void toolbar_changed_cb (EggToolbarsModel *model, int position, EggEditableToolbar *etoolbar) { GtkWidget *toolbar; EggTbModelFlags flags; GtkToolbarStyle style; flags = egg_toolbars_model_get_flags (model, position); toolbar = get_toolbar_nth (etoolbar, position); if (flags & EGG_TB_MODEL_ICONS) { style = GTK_TOOLBAR_ICONS; } else if (flags & EGG_TB_MODEL_TEXT) { style = GTK_TOOLBAR_TEXT; } else if (flags & EGG_TB_MODEL_BOTH) { style = GTK_TOOLBAR_BOTH; } else if (flags & EGG_TB_MODEL_BOTH_HORIZ) { style = GTK_TOOLBAR_BOTH_HORIZ; } else { gtk_toolbar_unset_style (GTK_TOOLBAR (toolbar)); if (position == 0 && etoolbar->priv->fixed_toolbar) { unset_fixed_style (etoolbar); } return; } gtk_toolbar_set_style (GTK_TOOLBAR (toolbar), style); if (position == 0 && etoolbar->priv->fixed_toolbar) { set_fixed_style (etoolbar, style); } toolbar_visibility_refresh (etoolbar); }
JNIEXPORT void JNICALL Java_org_gnome_gtk_GtkToolbar_gtk_1toolbar_1unset_1style ( JNIEnv* env, jclass cls, jlong _self ) { GtkToolbar* self; // convert parameter self self = (GtkToolbar*) _self; // call function gtk_toolbar_unset_style(self); // cleanup parameter self }
static void set_toolbar_style_toggled (GtkCheckButton *button, GtkToolbar *toolbar) { GtkWidget *option_menu; int style; option_menu = g_object_get_data (G_OBJECT (button), "option-menu"); if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (button))) { style = gtk_combo_box_get_active (GTK_COMBO_BOX (option_menu)); gtk_toolbar_set_style (toolbar, style); gtk_widget_set_sensitive (option_menu, TRUE); } else { gtk_toolbar_unset_style (toolbar); gtk_widget_set_sensitive (option_menu, FALSE); } }
static void unset_fixed_style (EggEditableToolbar *t) { g_return_if_fail (GTK_IS_TOOLBAR (t->priv->fixed_toolbar)); gtk_toolbar_unset_style (GTK_TOOLBAR (t->priv->fixed_toolbar)); }
static VALUE rg_unset_style(VALUE self) { gtk_toolbar_unset_style(_SELF(self)); return self; }