Skip to content
Permalink
Browse files

avoid deprecated GtkStock

  • Loading branch information...
sc0w authored and raveit65 committed Feb 3, 2018
1 parent 94618cb commit 607d5228f3a280dd8acfcdaba7da7c83c496de32
@@ -220,9 +220,9 @@ static void dialog_cb(GtkAction* action, AccessxStatusApplet* sapplet)
}

static const GtkActionEntry accessx_status_applet_menu_actions[] = {
{"Dialog", GTK_STOCK_PROPERTIES, N_("_Keyboard Accessibility Preferences"), NULL, NULL, G_CALLBACK(dialog_cb)},
{"Help", GTK_STOCK_HELP, N_("_Help"), NULL, NULL, G_CALLBACK(help_cb)},
{"About", GTK_STOCK_ABOUT, N_("_About"), NULL, NULL, G_CALLBACK(about_cb)}
{"Dialog", "document-properties", N_("_Keyboard Accessibility Preferences"), NULL, NULL, G_CALLBACK(dialog_cb)},
{"Help", "help-browser", N_("_Help"), NULL, NULL, G_CALLBACK(help_cb)},
{"About", "help-about", N_("_About"), NULL, NULL, G_CALLBACK(about_cb)}
};

static XkbDescPtr accessx_status_applet_get_xkb_desc(AccessxStatusApplet* sapplet)
@@ -928,7 +928,7 @@ static void accessx_applet_add_stock_icons(AccessxStatusApplet* sapplet, GtkWidg
}
else
{
GtkIconSet* default_set = gtk_icon_factory_lookup_default(GTK_STOCK_MISSING_IMAGE);
GtkIconSet* default_set = gtk_icon_factory_lookup_default("gtk-missing-image");
gtk_icon_source_set_pixbuf(source, gtk_icon_set_render_icon(default_set, gtk_widget_get_style(widget), GTK_TEXT_DIR_NONE, GTK_STATE_NORMAL, icon_size_spec, widget, NULL));
}
g_free(filename);
@@ -58,13 +58,13 @@ static void about_cb( GtkAction *, ProgressData * );
static void help_cb( GtkAction *, ProgressData * );

static const GtkActionEntry battstat_menu_actions [] = {
{ "BattstatProperties", GTK_STOCK_PROPERTIES, N_("_Preferences"),
{ "BattstatProperties", "document-properties", N_("_Preferences"),
NULL, NULL,
G_CALLBACK (prop_cb) },
{ "BattstatHelp", GTK_STOCK_HELP, N_("_Help"),
{ "BattstatHelp", "help-browser", N_("_Help"),
NULL, NULL,
G_CALLBACK (help_cb) },
{ "BattstatAbout", GTK_STOCK_ABOUT, N_("_About"),
{ "BattstatAbout", "help-about", N_("_About"),
NULL, NULL,
G_CALLBACK (about_cb) }
};
@@ -438,7 +438,7 @@ battery_full_dialog (GtkWidget *applet)
_("Battery Notice"),
NULL,
GTK_DIALOG_DESTROY_WITH_PARENT,
GTK_STOCK_OK,
"gtk-ok",
GTK_RESPONSE_ACCEPT,
NULL);
g_signal_connect_swapped (G_OBJECT (dialog), "response",
@@ -593,7 +593,7 @@ battery_low_dialog( ProgressData *battery, BatteryStatus *info )
_("Battery Notice"),
NULL,
GTK_DIALOG_DESTROY_WITH_PARENT,
GTK_STOCK_OK,
"gtk-ok",
GTK_RESPONSE_ACCEPT,
NULL);
gtk_dialog_set_default_response( GTK_DIALOG (battery->battery_low_dialog),
@@ -693,13 +693,13 @@ get_chartable (charpick_data *curr_data)
}

static const GtkActionEntry charpick_applet_menu_actions [] = {
{ "Preferences", GTK_STOCK_PROPERTIES, N_("_Preferences"),
{ "Preferences", "document-properties", N_("_Preferences"),
NULL, NULL,
G_CALLBACK (show_preferences_dialog) },
{ "Help", GTK_STOCK_HELP, N_("_Help"),
{ "Help", "help-browser", N_("_Help"),
NULL, NULL,
G_CALLBACK (help_cb) },
{ "About", GTK_STOCK_ABOUT, N_("_About"),
{ "About", "help-about", N_("_About"),
NULL, NULL,
G_CALLBACK (about) }
};
@@ -27,7 +27,7 @@ register_stock_for_edit (void)
static const GtkStockItem edit_item [] = {
{ CHARPICK_STOCK_EDIT, N_("_Edit"), 0, 0, GETTEXT_PACKAGE },
};
icons = gtk_icon_factory_lookup_default (GTK_STOCK_PREFERENCES);
icons = gtk_icon_factory_lookup_default ("gtk-preferences");
factory = gtk_icon_factory_new ();
gtk_icon_factory_add (factory, CHARPICK_STOCK_EDIT, icons);
gtk_icon_factory_add_default (factory);
@@ -93,8 +93,8 @@ add_edit_dialog_create (charpick_data *curr_data, gchar *string, gchar *title)

dialog = gtk_dialog_new_with_buttons (_(title), GTK_WINDOW (curr_data->propwindow),
GTK_DIALOG_DESTROY_WITH_PARENT,
GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
GTK_STOCK_OK, GTK_RESPONSE_OK,
"gtk-cancel", GTK_RESPONSE_CANCEL,
"gtk-ok", GTK_RESPONSE_OK,
NULL);

gtk_window_set_transient_for (GTK_WINDOW (dialog), GTK_WINDOW (curr_data->propwindow));
@@ -465,22 +465,38 @@ static void default_chars_frame_create(charpick_data *curr_data)

vbox2 = gtk_box_new (GTK_ORIENTATION_VERTICAL, 6);
gtk_box_pack_start (GTK_BOX (hbox), vbox2, FALSE, FALSE, 0);
button = gtk_button_new_from_stock (GTK_STOCK_ADD);

button = GTK_WIDGET (g_object_new (GTK_TYPE_BUTTON,
"label", "gtk-add",
"use-stock", TRUE,
"use-underline", TRUE,
NULL));

gtk_box_pack_start (GTK_BOX (vbox2), button, FALSE, FALSE, 0);
g_signal_connect (G_OBJECT (button), "clicked",
G_CALLBACK (add_palette), curr_data);
set_access_namedesc (button, _("Add button"),
_("Click to add a new palette"));

button = gtk_button_new_from_stock (CHARPICK_STOCK_EDIT);
button = GTK_WIDGET (g_object_new (GTK_TYPE_BUTTON,
"label", CHARPICK_STOCK_EDIT,
"use-stock", TRUE,
"use-underline", TRUE,
NULL));

gtk_box_pack_start (GTK_BOX (vbox2), button, FALSE, FALSE, 0);
g_signal_connect (G_OBJECT (button), "clicked",
G_CALLBACK (edit_palette), curr_data);
g_object_set_data (G_OBJECT (scrolled), "edit_button", button);
set_access_namedesc (button, _("Edit button"),
_("Click to edit the selected palette"));

button = gtk_button_new_from_stock (GTK_STOCK_DELETE);
button = GTK_WIDGET (g_object_new (GTK_TYPE_BUTTON,
"label", "gtk-delete",
"use-stock", TRUE,
"use-underline", TRUE,
NULL));

gtk_box_pack_start (GTK_BOX (vbox2), button, FALSE, FALSE, 0);
g_signal_connect (G_OBJECT (button), "clicked",
G_CALLBACK (delete_palette), curr_data);
@@ -540,8 +556,8 @@ show_preferences_dialog (GtkAction *action,
curr_data->propwindow = gtk_dialog_new_with_buttons (_("Character Palette Preferences"),
NULL,
GTK_DIALOG_DESTROY_WITH_PARENT,
GTK_STOCK_CLOSE, GTK_RESPONSE_CLOSE,
GTK_STOCK_HELP, GTK_RESPONSE_HELP,
"gtk-close", GTK_RESPONSE_CLOSE,
"gtk-help", GTK_RESPONSE_HELP,
NULL);
gtk_window_set_screen (GTK_WINDOW (curr_data->propwindow),
gtk_widget_get_screen (curr_data->applet));
@@ -71,8 +71,8 @@ static void command_settings_callback (GtkAction *action, CommandApplet *command
static gboolean command_execute (CommandApplet *command_applet);

static const GtkActionEntry applet_menu_actions [] = {
{ "Preferences", GTK_STOCK_PROPERTIES, N_("_Preferences"), NULL, NULL, G_CALLBACK (command_settings_callback) },
{ "About", GTK_STOCK_ABOUT, N_("_About"), NULL, NULL, G_CALLBACK (command_about_callback) }
{ "Preferences", "document-properties", N_("_Preferences"), NULL, NULL, G_CALLBACK (command_settings_callback) },
{ "About", "help-about", N_("_About"), NULL, NULL, G_CALLBACK (command_about_callback) }
};

static char *ui = "<menuitem name='Item 1' action='Preferences' />"
@@ -133,7 +133,7 @@ command_settings_callback (GtkAction *action, CommandApplet *command_applet)
dialog = GTK_DIALOG (gtk_dialog_new_with_buttons(_("Command Applet Preferences"),
NULL,
GTK_DIALOG_MODAL,
GTK_STOCK_CLOSE,
"gtk-close",
GTK_RESPONSE_CLOSE,
NULL));
grid = GTK_GRID (gtk_grid_new ());
@@ -123,13 +123,13 @@ static const gchar* const cpufreq_icons[] = {
};

static const GtkActionEntry cpufreq_applet_menu_actions[] = {
{ "CPUFreqAppletPreferences", GTK_STOCK_PROPERTIES, N_("_Preferences"),
{ "CPUFreqAppletPreferences", "document-properties", N_("_Preferences"),
NULL, NULL,
G_CALLBACK (cpufreq_applet_preferences_cb) },
{ "CPUFreqAppletHelp", GTK_STOCK_HELP, N_("_Help"),
{ "CPUFreqAppletHelp", "help-browser", N_("_Help"),
NULL, NULL,
G_CALLBACK (cpufreq_applet_help_cb) },
{ "CPUFreqAppletAbout", GTK_STOCK_ABOUT, N_("_About"),
{ "CPUFreqAppletAbout", "help-about", N_("_About"),
NULL, NULL,
G_CALLBACK (cpufreq_applet_about_cb) }
};
@@ -156,10 +156,10 @@ display_help (GtkAction *action,
}

static const GtkActionEntry applet_menu_actions[] = {
{ "Help", GTK_STOCK_HELP, N_("_Help"),
{ "Help", "help-browser", N_("_Help"),
NULL, NULL,
G_CALLBACK (display_help) },
{ "About", GTK_STOCK_ABOUT, N_("_About"),
{ "About", "help-about", N_("_About"),
NULL, NULL,
G_CALLBACK (display_about_dialog) }
};
@@ -348,13 +348,13 @@ help_cb (GtkAction *action,


static const GtkActionEntry geyes_applet_menu_actions [] = {
{ "Props", GTK_STOCK_PROPERTIES, N_("_Preferences"),
{ "Props", "document-properties", N_("_Preferences"),
NULL, NULL,
G_CALLBACK (properties_cb) },
{ "Help", GTK_STOCK_HELP, N_("_Help"),
{ "Help", "help-browser", N_("_Help"),
NULL, NULL,
G_CALLBACK (help_cb) },
{ "About", GTK_STOCK_ABOUT, N_("_About"),
{ "About", "help-about", N_("_About"),
NULL, NULL,
G_CALLBACK (about_cb) }
};
@@ -284,8 +284,8 @@ properties_cb (GtkAction *action,

pbox = gtk_dialog_new_with_buttons (_("Geyes Preferences"), NULL,
GTK_DIALOG_DESTROY_WITH_PARENT,
GTK_STOCK_CLOSE, GTK_RESPONSE_CLOSE,
GTK_STOCK_HELP, GTK_RESPONSE_HELP,
"gtk-close", GTK_RESPONSE_CLOSE,
"gtk-help", GTK_RESPONSE_HELP,
NULL);

gtk_window_set_screen (GTK_WINDOW (pbox),
@@ -108,16 +108,16 @@ static const GtkActionEntry weather_applet_menu_actions [] = {
{ "Details", NULL, N_("_Details"),
NULL, NULL,
G_CALLBACK (details_cb) },
{ "Update", GTK_STOCK_REFRESH, N_("_Update"),
{ "Update", "view-refresh", N_("_Update"),
NULL, NULL,
G_CALLBACK (update_cb) },
{ "Props", GTK_STOCK_PROPERTIES, N_("_Preferences"),
{ "Props", "document-properties", N_("_Preferences"),
NULL, NULL,
G_CALLBACK (pref_cb) },
{ "Help", GTK_STOCK_HELP, N_("_Help"),
{ "Help", "help-browser", N_("_Help"),
NULL, NULL,
G_CALLBACK (help_cb) },
{ "About", GTK_STOCK_ABOUT, N_("_About"),
{ "About", "help-about", N_("_About"),
NULL, NULL,
G_CALLBACK (about_cb) }
};
@@ -184,7 +184,7 @@ static void mateweather_dialog_create(MateWeatherDialog* dialog)
gtk_window_set_title (GTK_WINDOW (dialog), _("Details"));
gtk_dialog_add_buttons (GTK_DIALOG (dialog),
_("_Update"), GTK_RESPONSE_OK,
GTK_STOCK_CLOSE, GTK_RESPONSE_CLOSE,
"gtk-close", GTK_RESPONSE_CLOSE,
NULL);
gtk_dialog_set_default_response (GTK_DIALOG (dialog), GTK_RESPONSE_CLOSE);
gtk_container_set_border_width (GTK_CONTAINER (dialog), 5);
@@ -810,7 +810,7 @@ static void mateweather_pref_create(MateWeatherPref* pref)

g_object_set (pref, "destroy-with-parent", TRUE, NULL);
gtk_window_set_title (GTK_WINDOW (pref), _("Weather Preferences"));
gtk_dialog_add_buttons (GTK_DIALOG (pref), GTK_STOCK_CLOSE, GTK_RESPONSE_CLOSE, GTK_STOCK_HELP, GTK_RESPONSE_HELP, NULL);
gtk_dialog_add_buttons (GTK_DIALOG (pref), "gtk-close", GTK_RESPONSE_CLOSE, "gtk-help", GTK_RESPONSE_HELP, NULL);
gtk_dialog_set_default_response (GTK_DIALOG (pref), GTK_RESPONSE_CLOSE);
gtk_container_set_border_width (GTK_CONTAINER (pref), 5);
gtk_window_set_resizable (GTK_WINDOW (pref), TRUE);
@@ -1130,7 +1130,7 @@ static void mateweather_pref_create(MateWeatherPref* pref)
pref->priv->find_next_btn = gtk_button_new_with_mnemonic (_("Find _Next"));
gtk_widget_set_sensitive (pref->priv->find_next_btn, FALSE);

image = gtk_image_new_from_stock (GTK_STOCK_FIND, GTK_ICON_SIZE_BUTTON);
image = gtk_image_new_from_icon_name ("edit-find", GTK_ICON_SIZE_BUTTON);
gtk_button_set_image (GTK_BUTTON (pref->priv->find_next_btn), image);

g_signal_connect (G_OBJECT (pref->priv->find_next_btn), "clicked", G_CALLBACK (find_next_clicked), pref);
@@ -474,16 +474,16 @@ multiload_applet_refresh(MultiloadApplet *ma)
}

static const GtkActionEntry multiload_menu_actions [] = {
{ "MultiLoadProperties", GTK_STOCK_PROPERTIES, N_("_Preferences"),
{ "MultiLoadProperties", "document-properties", N_("_Preferences"),
NULL, NULL,
G_CALLBACK (multiload_properties_cb) },
{ "MultiLoadRunProcman", GTK_STOCK_EXECUTE, N_("_Open System Monitor"),
{ "MultiLoadRunProcman", "system-run", N_("_Open System Monitor"),
NULL, NULL,
G_CALLBACK (start_procman_cb) },
{ "MultiLoadHelp", GTK_STOCK_HELP, N_("_Help"),
{ "MultiLoadHelp", "help-browser", N_("_Help"),
NULL, NULL,
G_CALLBACK (help_cb) },
{ "MultiLoadAbout", GTK_STOCK_ABOUT, N_("_About"),
{ "MultiLoadAbout", "help-about", N_("_About"),
NULL, NULL,
G_CALLBACK (about_cb) }
};
@@ -817,8 +817,8 @@ multiload_properties_cb (GtkAction *action,

dialog = gtk_dialog_new_with_buttons (_("System Monitor Preferences"),
NULL, 0,
GTK_STOCK_HELP, GTK_RESPONSE_HELP,
GTK_STOCK_CLOSE, GTK_RESPONSE_CLOSE,
"gtk-help", GTK_RESPONSE_HELP,
"gtk-close", GTK_RESPONSE_CLOSE,
NULL);
gtk_window_set_screen (GTK_WINDOW (dialog),
gtk_widget_get_screen (GTK_WIDGET (ma->applet)));
@@ -958,8 +958,8 @@ settings_cb(GtkAction *action, gpointer data)
applet->settings = GTK_DIALOG(gtk_dialog_new_with_buttons(_("Mate Netspeed Preferences"),
NULL,
GTK_DIALOG_DESTROY_WITH_PARENT,
GTK_STOCK_HELP, GTK_RESPONSE_HELP,
GTK_STOCK_CLOSE, GTK_RESPONSE_ACCEPT,
"gtk-help", GTK_RESPONSE_HELP,
"gtk-close", GTK_RESPONSE_ACCEPT,
NULL));

gtk_window_set_resizable(GTK_WINDOW(applet->settings), FALSE);
@@ -1166,8 +1166,8 @@ showinfo_cb(GtkAction *action, gpointer data)
applet->details = GTK_DIALOG(gtk_dialog_new_with_buttons(title,
NULL,
GTK_DIALOG_DESTROY_WITH_PARENT,
GTK_STOCK_CLOSE, GTK_RESPONSE_ACCEPT,
GTK_STOCK_HELP, GTK_RESPONSE_HELP,
"gtk-close", GTK_RESPONSE_ACCEPT,
"gtk-help", GTK_RESPONSE_HELP,
NULL));
g_free(title);

@@ -1340,13 +1340,13 @@ showinfo_cb(GtkAction *action, gpointer data)
}

static const GtkActionEntry mate_netspeed_applet_menu_actions [] = {
{ "MateNetspeedAppletDetails", GTK_STOCK_INFO, N_("Device _Details"),
{ "MateNetspeedAppletDetails", "dialog-information", N_("Device _Details"),
NULL, NULL, G_CALLBACK (showinfo_cb) },
{ "MateNetspeedAppletProperties", GTK_STOCK_PROPERTIES, N_("Preferences..."),
{ "MateNetspeedAppletProperties", "document-properties", N_("Preferences..."),
NULL, NULL, G_CALLBACK (settings_cb) },
{ "MateNetspeedAppletHelp", GTK_STOCK_HELP, N_("Help"),
{ "MateNetspeedAppletHelp", "help-browser", N_("Help"),
NULL, NULL, G_CALLBACK (help_cb) },
{ "MateNetspeedAppletAbout", GTK_STOCK_ABOUT, N_("About..."),
{ "MateNetspeedAppletAbout", "help-about", N_("About..."),
NULL, NULL, G_CALLBACK (about_cb) }
};

@@ -31,22 +31,22 @@ StickyNotes *stickynotes = NULL;
/* Popup menu on the applet */
static const GtkActionEntry stickynotes_applet_menu_actions[] =
{
{ "new_note", GTK_STOCK_NEW, N_("_New Note"),
{ "new_note", "document-new", N_("_New Note"),
NULL, NULL,
G_CALLBACK (menu_new_note_cb) },
{ "hide_notes", NULL, N_("Hi_de Notes"),
NULL, NULL,
G_CALLBACK (menu_hide_notes_cb) },
{ "destroy_all", GTK_STOCK_DELETE, N_("_Delete Notes"),
{ "destroy_all", "edit-delete", N_("_Delete Notes"),
NULL, NULL,
G_CALLBACK (menu_destroy_all_cb) },
{ "preferences", GTK_STOCK_PROPERTIES, N_("_Preferences"),
{ "preferences", "document-properties", N_("_Preferences"),
NULL, NULL,
G_CALLBACK (menu_preferences_cb) },
{ "help", GTK_STOCK_HELP, N_("_Help"),
{ "help", "help-browser", N_("_Help"),
NULL, NULL,
G_CALLBACK (menu_help_cb) },
{ "about", GTK_STOCK_ABOUT, N_("_About"),
{ "about", "help-about", N_("_About"),
NULL, NULL,
G_CALLBACK (menu_about_cb) }
};
Oops, something went wrong.

0 comments on commit 607d522

Please sign in to comment.
You can’t perform that action at this time.