summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPablo Barciela <[email protected]>2018-02-08 17:01:16 +0100
committerraveit65 <[email protected]>2018-02-09 18:30:24 +0100
commit36bcd30e3fb22d3c8c57c968fccfafe0c011e70f (patch)
treef20804d9619474a31ff1661276b12f37467a55e2
parent77f8101320655020044cde5dfd0cd29bab98f8ce (diff)
downloadmate-system-monitor-36bcd30e3fb22d3c8c57c968fccfafe0c011e70f.tar.bz2
mate-system-monitor-36bcd30e3fb22d3c8c57c968fccfafe0c011e70f.tar.xz
avoid deprecated GtkStock
-rw-r--r--src/interface.cpp12
-rw-r--r--src/lsof.cpp24
-rw-r--r--src/memmaps.cpp2
-rw-r--r--src/openfiles.cpp2
-rw-r--r--src/procdialogs.cpp10
-rw-r--r--src/procproperties.cpp2
6 files changed, 35 insertions, 17 deletions
diff --git a/src/interface.cpp b/src/interface.cpp
index 3bd7ab6..7113e6a 100644
--- a/src/interface.cpp
+++ b/src/interface.cpp
@@ -53,9 +53,9 @@ static const GtkActionEntry menu_entries[] =
{ "View", NULL, N_("_View") },
{ "Help", NULL, N_("_Help") },
- { "Lsof", GTK_STOCK_FIND, N_("Search for _Open Files"), "<control>O",
+ { "Lsof", "edit-find", N_("Search for _Open Files"), "<control>O",
N_("Search for open files"), G_CALLBACK(cb_show_lsof) },
- { "Quit", GTK_STOCK_QUIT, NULL, NULL,
+ { "Quit", "application-exit", N_("_Quit"), "<control>Q",
N_("Quit the program"), G_CALLBACK (cb_app_exit) },
@@ -70,10 +70,10 @@ static const GtkActionEntry menu_entries[] =
N_("Force process to finish immediately"), G_CALLBACK (cb_kill_process) },
{ "ChangePriority", NULL, N_("_Change Priority"), NULL,
N_("Change the order of priority of process"), NULL },
- { "Preferences", GTK_STOCK_PREFERENCES, NULL, NULL,
+ { "Preferences", "preferences-desktop", N_("_Preferences"), NULL,
N_("Configure the application"), G_CALLBACK (cb_edit_preferences) },
- { "Refresh", GTK_STOCK_REFRESH, N_("_Refresh"), "<control>R",
+ { "Refresh", "view-refresh", N_("_Refresh"), "<control>R",
N_("Refresh the process list"), G_CALLBACK(cb_user_refresh) },
{ "MemoryMaps", NULL, N_("_Memory Maps"), "<control>M",
@@ -85,9 +85,9 @@ static const GtkActionEntry menu_entries[] =
N_("View additional information about a process"), G_CALLBACK (cb_show_process_properties) },
- { "HelpContents", GTK_STOCK_HELP, N_("_Contents"), "F1",
+ { "HelpContents", "help-browser", N_("_Contents"), "F1",
N_("Open the manual"), G_CALLBACK (cb_help_contents) },
- { "About", GTK_STOCK_ABOUT, NULL, NULL,
+ { "About", "help-about", N_("_About"), NULL,
N_("About this application"), G_CALLBACK (cb_about) }
};
diff --git a/src/lsof.cpp b/src/lsof.cpp
index 0a11c0a..c2c0fda 100644
--- a/src/lsof.cpp
+++ b/src/lsof.cpp
@@ -338,9 +338,21 @@ void procman_lsof(ProcData *procdata)
GtkWidget *entry = gtk_entry_new();
gtk_box_pack_start(GTK_BOX(hbox), entry, TRUE, TRUE, 0);
- GtkWidget *search_button = gtk_button_new_from_stock(GTK_STOCK_FIND);
+
+ GtkWidget *search_button = GTK_WIDGET (g_object_new (GTK_TYPE_BUTTON,
+ "label", "gtk-find",
+ "use-stock", TRUE,
+ "use-underline", TRUE,
+ NULL));
+
gtk_box_pack_start(GTK_BOX(hbox), search_button, FALSE, FALSE, 0);
- GtkWidget *clear_button = gtk_button_new_from_stock(GTK_STOCK_CLEAR);
+
+ GtkWidget *clear_button = GTK_WIDGET (g_object_new (GTK_TYPE_BUTTON,
+ "label", "gtk-clear",
+ "use-stock", TRUE,
+ "use-underline", TRUE,
+ NULL));
+
/* The default accelerator collides with the default close accelerator. */
gtk_button_set_label(GTK_BUTTON(clear_button), _("C_lear"));
gtk_box_pack_start(GTK_BOX(hbox), clear_button, FALSE, FALSE, 0);
@@ -370,7 +382,13 @@ void procman_lsof(ProcData *procdata)
gtk_box_pack_start(GTK_BOX(mainbox), scrolled, TRUE, TRUE, 0);
GtkWidget *bottom_box = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 12);
- GtkWidget *close_button = gtk_button_new_from_stock(GTK_STOCK_CLOSE);
+
+ GtkWidget *close_button = GTK_WIDGET (g_object_new (GTK_TYPE_BUTTON,
+ "label", "gtk-close",
+ "use-stock", TRUE,
+ "use-underline", TRUE,
+ NULL));
+
gtk_box_pack_start(GTK_BOX(mainbox), bottom_box, FALSE, FALSE, 0);
gtk_box_pack_end(GTK_BOX(bottom_box), close_button, FALSE, FALSE, 0);
diff --git a/src/memmaps.cpp b/src/memmaps.cpp
index ddbb3a9..6f8a25d 100644
--- a/src/memmaps.cpp
+++ b/src/memmaps.cpp
@@ -431,7 +431,7 @@ create_single_memmaps_dialog (GtkTreeModel *model, GtkTreePath *path,
memmapsdialog = gtk_dialog_new_with_buttons (_("Memory Maps"), GTK_WINDOW (procdata->app),
GTK_DIALOG_DESTROY_WITH_PARENT,
- GTK_STOCK_CLOSE, GTK_RESPONSE_CLOSE,
+ "gtk-close", GTK_RESPONSE_CLOSE,
NULL);
gtk_window_set_resizable(GTK_WINDOW(memmapsdialog), TRUE);
gtk_window_set_default_size(GTK_WINDOW(memmapsdialog), 620, 400);
diff --git a/src/openfiles.cpp b/src/openfiles.cpp
index 10f164c..f972c51 100644
--- a/src/openfiles.cpp
+++ b/src/openfiles.cpp
@@ -323,7 +323,7 @@ create_single_openfiles_dialog (GtkTreeModel *model, GtkTreePath *path,
openfilesdialog = gtk_dialog_new_with_buttons (_("Open Files"), NULL,
GTK_DIALOG_DESTROY_WITH_PARENT,
- GTK_STOCK_CLOSE, GTK_RESPONSE_CLOSE,
+ "gtk-close", GTK_RESPONSE_CLOSE,
NULL);
gtk_window_set_resizable (GTK_WINDOW (openfilesdialog), TRUE);
gtk_window_set_default_size (GTK_WINDOW (openfilesdialog), 575, 400);
diff --git a/src/procdialogs.cpp b/src/procdialogs.cpp
index f980ed2..4a16a03 100644
--- a/src/procdialogs.cpp
+++ b/src/procdialogs.cpp
@@ -104,7 +104,7 @@ procdialog_create_kill_dialog (ProcData *procdata, int signal)
secondary);
gtk_dialog_add_buttons (GTK_DIALOG (kill_alert_dialog),
- GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
+ "gtk-cancel", GTK_RESPONSE_CANCEL,
button_text, GTK_RESPONSE_OK,
NULL);
@@ -171,7 +171,7 @@ procdialog_create_renice_dialog (ProcData *procdata)
info->name, info->pid);
dialog = gtk_dialog_new_with_buttons (dialog_title, NULL,
GTK_DIALOG_DESTROY_WITH_PARENT,
- GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
+ "gtk-cancel", GTK_RESPONSE_CANCEL,
NULL);
g_free (dialog_title);
@@ -182,7 +182,7 @@ procdialog_create_renice_dialog (ProcData *procdata)
button = gtk_button_new_with_mnemonic (_("Change _Priority"));
gtk_widget_set_can_default (button, TRUE);
- icon = gtk_image_new_from_stock (GTK_STOCK_OK, GTK_ICON_SIZE_BUTTON);
+ icon = gtk_image_new_from_stock ("gtk-ok", GTK_ICON_SIZE_BUTTON);
gtk_button_set_image (GTK_BUTTON (button), icon);
gtk_dialog_add_action_widget (GTK_DIALOG (renice_dialog), button, 100);
@@ -531,8 +531,8 @@ procdialog_create_preferences_dialog (ProcData *procdata)
dialog = gtk_dialog_new_with_buttons (_("System Monitor Preferences"),
GTK_WINDOW (procdata->app),
GTK_DIALOG_DESTROY_WITH_PARENT,
- GTK_STOCK_HELP, GTK_RESPONSE_HELP,
- GTK_STOCK_CLOSE, GTK_RESPONSE_CLOSE,
+ "gtk-help", GTK_RESPONSE_HELP,
+ "gtk-close", GTK_RESPONSE_CLOSE,
NULL);
/* FIXME: we should not declare the window size, but let it's */
/* driven by window childs. The problem is that the fields list */
diff --git a/src/procproperties.cpp b/src/procproperties.cpp
index 5effc9a..6af225a 100644
--- a/src/procproperties.cpp
+++ b/src/procproperties.cpp
@@ -241,7 +241,7 @@ create_single_procproperties_dialog (GtkTreeModel *model, GtkTreePath *path,
procpropdialog = gtk_dialog_new_with_buttons (_("Process Properties"), NULL,
GTK_DIALOG_DESTROY_WITH_PARENT,
- GTK_STOCK_CLOSE, GTK_RESPONSE_CLOSE,
+ "gtk-close", GTK_RESPONSE_CLOSE,
NULL);
gtk_window_set_resizable (GTK_WINDOW (procpropdialog), TRUE);
gtk_window_set_default_size (GTK_WINDOW (procpropdialog), 575, 400);