Beispiel #1
0
static void
on_preferences_activate (GtkAction *action, AnjutaTestShell *shell)
{
	GtkWidget *preferences_dialog;
	
	preferences_dialog = anjuta_preferences_get_dialog (shell->preferences);
		
	g_signal_connect_swapped (G_OBJECT (preferences_dialog),
					  		  "response",
					  		  G_CALLBACK (gtk_widget_destroy),
					  		  preferences_dialog); 
	
	gtk_window_set_transient_for (GTK_WINDOW (preferences_dialog),
								  GTK_WINDOW (shell));
								  
	gtk_widget_show (preferences_dialog);
}
Beispiel #2
0
static void ipreferences_merge(IAnjutaPreferences* ipref, AnjutaPreferences* prefs, GError** e) {
    GdkPixbuf *pixbuf;
    GError *error = NULL;

    SJCDPlugin* plugin = SJCD_PLUGIN(ipref);
    plugin->prefs = init_sjcd_preferences();
    if (plugin->prefs == NULL)
        return;

    pixbuf = gtk_icon_theme_load_icon(gtk_icon_theme_get_default(), PREFERENCE_ICON, 48, 0, &error);

    if (!pixbuf) {
        g_warning (N_("Couldn't load icon: %s"), error->message);
        g_error_free(error);
    }

    anjuta_preferences_dialog_add_page(ANJUTA_PREFERENCES_DIALOG (anjuta_preferences_get_dialog (prefs)), "gtkpod-track-display-settings", TAB_NAME, pixbuf, plugin->prefs);
    g_object_unref(pixbuf);
}
Beispiel #3
0
static void ipreferences_merge(IAnjutaPreferences* ipref, AnjutaPreferences* prefs, GError** e) {
    GdkPixbuf *pixbuf;
    GdkPixbuf *scaled;

    ExternalPlayerPlugin* plugin = EXTERNAL_PLAYER_PLUGIN(ipref);
    plugin->prefs = init_external_player_preferences();
    if (plugin->prefs == NULL)
        return;

    pixbuf = gtk_widget_render_icon_pixbuf(plugin->prefs, GTK_STOCK_MEDIA_PLAY, GTK_ICON_SIZE_LARGE_TOOLBAR);
    if (!pixbuf) {
        g_warning (N_("Couldn't load theme media player icon"));
    }

    scaled = gdk_pixbuf_scale_simple(pixbuf, 48, 48, GDK_INTERP_BILINEAR);

    anjuta_preferences_dialog_add_page(ANJUTA_PREFERENCES_DIALOG (anjuta_preferences_get_dialog (prefs)), "gtkpod-external-player-settings", TAB_NAME, scaled, plugin->prefs);
    g_object_unref(scaled);
    g_object_unref(pixbuf);
}