summaryrefslogtreecommitdiff
path: root/gsearchtool
diff options
context:
space:
mode:
Diffstat (limited to 'gsearchtool')
-rw-r--r--gsearchtool/src/gsearchtool-callbacks.c37
-rw-r--r--gsearchtool/src/gsearchtool-support.c6
-rw-r--r--gsearchtool/src/gsearchtool-support.h4
-rw-r--r--gsearchtool/src/gsearchtool.c45
4 files changed, 69 insertions, 23 deletions
diff --git a/gsearchtool/src/gsearchtool-callbacks.c b/gsearchtool/src/gsearchtool-callbacks.c
index 55b1e086..67dca06e 100644
--- a/gsearchtool/src/gsearchtool-callbacks.c
+++ b/gsearchtool/src/gsearchtool-callbacks.c
@@ -369,7 +369,12 @@ display_dialog_file_open_limit (GtkWidget * window,
gtk_container_set_border_width (GTK_CONTAINER (dialog), 5);
gtk_box_set_spacing (GTK_BOX (gtk_dialog_get_content_area (GTK_DIALOG (dialog))), 14);
- button = gtk_button_new_from_stock ("gtk-open");
+ button = GTK_WIDGET (g_object_new (GTK_TYPE_BUTTON,
+ "label", "gtk-open",
+ "use-stock", TRUE,
+ "use-underline", TRUE,
+ NULL));
+
gtk_widget_set_can_default (button, TRUE);
gtk_widget_show (button);
@@ -566,7 +571,12 @@ display_dialog_folder_open_limit (GtkWidget * window,
gtk_container_set_border_width (GTK_CONTAINER (dialog), 5);
gtk_box_set_spacing (GTK_BOX (gtk_dialog_get_content_area (GTK_DIALOG (dialog))), 14);
- button = gtk_button_new_from_stock ("gtk-open");
+ button = GTK_WIDGET (g_object_new (GTK_TYPE_BUTTON,
+ "label", "gtk-open",
+ "use-stock", TRUE,
+ "use-underline", TRUE,
+ NULL));
+
gtk_widget_set_can_default (button, TRUE);
gtk_widget_show (button);
@@ -746,7 +756,12 @@ display_dialog_delete_permanently (GtkWidget * window,
gtk_container_set_border_width (GTK_CONTAINER (dialog), 5);
gtk_box_set_spacing (GTK_BOX (gtk_dialog_get_content_area (GTK_DIALOG (dialog))), 14);
- button = gtk_button_new_from_stock ("gtk-delete");
+ button = GTK_WIDGET (g_object_new (GTK_TYPE_BUTTON,
+ "label", "gtk-delete",
+ "use-stock", TRUE,
+ "use-underline", TRUE,
+ NULL));
+
gtk_widget_set_can_default (button, TRUE);
gtk_widget_show (button);
@@ -1094,7 +1109,7 @@ build_popup_menu_for_file (GSearchWindow * gsearch,
gtk_image_menu_item_set_always_show_image (GTK_IMAGE_MENU_ITEM (new1), file_icon != NULL);
if (file_icon == NULL) {
- file_icon = g_themed_icon_new (GTK_STOCK_OPEN);
+ file_icon = g_themed_icon_new ("gtk-open");
}
image1 = gtk_image_new_from_gicon (file_icon, GTK_ICON_SIZE_MENU);
@@ -1132,7 +1147,7 @@ build_popup_menu_for_file (GSearchWindow * gsearch,
gtk_image_menu_item_set_always_show_image (GTK_IMAGE_MENU_ITEM (new1), file_icon != NULL);
if (file_icon == NULL) {
- file_icon = g_themed_icon_new (GTK_STOCK_OPEN);
+ file_icon = g_themed_icon_new ("gtk-open");
}
image1 = gtk_image_new_from_gicon (file_icon, GTK_ICON_SIZE_MENU);
@@ -1167,7 +1182,7 @@ build_popup_menu_for_file (GSearchWindow * gsearch,
gtk_image_menu_item_set_always_show_image (GTK_IMAGE_MENU_ITEM (new1), file_icon != NULL);
if (file_icon == NULL) {
- file_icon = g_themed_icon_new (GTK_STOCK_OPEN);
+ file_icon = g_themed_icon_new ("gtk-open");
}
image1 = gtk_image_new_from_gicon (file_icon, GTK_ICON_SIZE_MENU);
@@ -1514,7 +1529,7 @@ drag_begin_file_cb (GtkWidget * widget,
number_of_selected_rows = gtk_tree_selection_count_selected_rows (GTK_TREE_SELECTION (gsearch->search_results_selection));
if (number_of_selected_rows > 1) {
- gtk_drag_set_icon_stock (context, GTK_STOCK_DND_MULTIPLE, 0, 0);
+ gtk_drag_set_icon_stock (context, "gtk-dnd-multiple", 0, 0);
}
else if (number_of_selected_rows == 1) {
GdkPixbuf * pixbuf;
@@ -1538,7 +1553,7 @@ drag_begin_file_cb (GtkWidget * widget,
gtk_drag_set_icon_pixbuf (context, pixbuf, 0, 0);
}
else {
- gtk_drag_set_icon_stock (context, GTK_STOCK_DND, 0, 0);
+ gtk_drag_set_icon_stock (context, "gtk-dnd", 0, 0);
}
}
}
@@ -1618,8 +1633,8 @@ show_file_selector_cb (GtkAction * action,
file_chooser = gtk_file_chooser_dialog_new (_("Save Search Results As..."),
GTK_WINDOW (gsearch->window),
GTK_FILE_CHOOSER_ACTION_SAVE,
- GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
- GTK_STOCK_SAVE, GTK_RESPONSE_OK,
+ "gtk-cancel", GTK_RESPONSE_CANCEL,
+ "gtk-save", GTK_RESPONSE_OK,
NULL);
gtk_file_chooser_set_do_overwrite_confirmation (GTK_FILE_CHOOSER (file_chooser), TRUE);
@@ -1727,7 +1742,7 @@ display_dialog_could_not_save_exists (GtkWidget * window,
gtk_container_set_border_width (GTK_CONTAINER (dialog), 5);
gtk_box_set_spacing (GTK_BOX (gtk_dialog_get_content_area (GTK_DIALOG (dialog))), 14);
- button = gsearchtool_button_new_with_stock_icon (_("_Replace"), GTK_STOCK_OK);
+ button = gsearchtool_button_new_with_icon (_("_Replace"), "gtk-ok");
gtk_widget_set_can_default (button, TRUE);
gtk_widget_show (button);
diff --git a/gsearchtool/src/gsearchtool-support.c b/gsearchtool/src/gsearchtool-support.c
index 5804e378..61f456ae 100644
--- a/gsearchtool/src/gsearchtool-support.c
+++ b/gsearchtool/src/gsearchtool-support.c
@@ -1117,8 +1117,8 @@ gsearchtool_get_unique_filename (const gchar * path,
}
GtkWidget *
-gsearchtool_button_new_with_stock_icon (const gchar * string,
- const gchar * stock_id)
+gsearchtool_button_new_with_icon (const gchar * string,
+ const gchar * icon_name)
{
GtkWidget * button;
GtkWidget * hbox;
@@ -1128,7 +1128,7 @@ gsearchtool_button_new_with_stock_icon (const gchar * string,
button = gtk_button_new ();
label = gtk_label_new_with_mnemonic (string);
gtk_label_set_mnemonic_widget (GTK_LABEL (label), GTK_WIDGET (button));
- image = gtk_image_new_from_stock (stock_id, GTK_ICON_SIZE_BUTTON);
+ image = gtk_image_new_from_icon_name (icon_name, GTK_ICON_SIZE_BUTTON);
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 2);
gtk_box_pack_start (GTK_BOX (hbox), image, FALSE, FALSE, 0);
gtk_box_pack_end (GTK_BOX (hbox), label, FALSE, FALSE, 0);
diff --git a/gsearchtool/src/gsearchtool-support.h b/gsearchtool/src/gsearchtool-support.h
index 15585d5d..7d9842b7 100644
--- a/gsearchtool/src/gsearchtool-support.h
+++ b/gsearchtool/src/gsearchtool-support.h
@@ -93,8 +93,8 @@ gchar *
gsearchtool_get_unique_filename (const gchar * path,
const gchar * suffix);
GtkWidget *
-gsearchtool_button_new_with_stock_icon (const gchar * string,
- const gchar * stock_id);
+gsearchtool_button_new_with_icon (const gchar * string,
+ const gchar * icon_name);
GSList *
gsearchtool_get_columns_order (GtkTreeView * treeview);
diff --git a/gsearchtool/src/gsearchtool.c b/gsearchtool/src/gsearchtool.c
index eeae2ecd..368bbe69 100644
--- a/gsearchtool/src/gsearchtool.c
+++ b/gsearchtool/src/gsearchtool.c
@@ -1798,7 +1798,7 @@ handle_search_command_stderr_io (GIOChannel * ioc,
gtk_box_pack_start (GTK_BOX (gtk_dialog_get_content_area (GTK_DIALOG (dialog))), hbox, FALSE, FALSE, 0);
gtk_widget_show_all (hbox);
- button = gsearchtool_button_new_with_stock_icon (_("Disable _Quick Search"), GTK_STOCK_OK);
+ button = gsearchtool_button_new_with_icon (_("Disable _Quick Search"), "gtk-ok");
gtk_widget_set_can_default (button, TRUE);
gtk_widget_show (button);
@@ -2051,7 +2051,12 @@ create_constraint_box (GSearchWindow * gsearch,
break;
}
- button = gtk_button_new_from_stock (GTK_STOCK_REMOVE);
+ button = GTK_WIDGET (g_object_new (GTK_TYPE_BUTTON,
+ "label", "gtk-remove",
+ "use-stock", TRUE,
+ "use-underline", TRUE,
+ NULL));
+
gtk_widget_set_can_default (button, FALSE);
{
@@ -2197,7 +2202,12 @@ create_additional_constraint_section (GSearchWindow * gsearch)
_("Select a search option from the drop-down list."));
}
- gsearch->available_options_add_button = gtk_button_new_from_stock (GTK_STOCK_ADD);
+ gsearch->available_options_add_button = GTK_WIDGET (g_object_new (GTK_TYPE_BUTTON,
+ "label", "gtk-add",
+ "use-stock", TRUE,
+ "use-underline", TRUE,
+ NULL));
+
gtk_widget_set_can_default (gsearch->available_options_add_button, FALSE);
gsearch->available_options_button_size_group = gtk_size_group_new (GTK_SIZE_GROUP_BOTH);
gtk_size_group_add_widget (gsearch->available_options_button_size_group, gsearch->available_options_add_button);
@@ -2877,7 +2887,14 @@ gsearch_app_create (GSearchWindow * gsearch)
gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 0);
gtk_box_set_spacing (GTK_BOX (hbox), 6);
- button = gtk_button_new_from_stock (GTK_STOCK_HELP);
+
+ button = GTK_WIDGET (g_object_new (GTK_TYPE_BUTTON,
+ "label", "gtk-help",
+ "use-stock", TRUE,
+ "use-underline", TRUE,
+ NULL));
+
+
gtk_widget_set_can_default (button, TRUE);
gtk_box_pack_start (GTK_BOX (hbox), button, FALSE, FALSE, 0);
gtk_button_box_set_child_secondary (GTK_BUTTON_BOX (hbox), button, TRUE);
@@ -2887,7 +2904,12 @@ gsearch_app_create (GSearchWindow * gsearch)
add_atk_namedesc (GTK_WIDGET (button), NULL, _("Click to display the help manual."));
}
- button = gtk_button_new_from_stock (GTK_STOCK_CLOSE);
+ button = GTK_WIDGET (g_object_new (GTK_TYPE_BUTTON,
+ "label", "gtk-close",
+ "use-stock", TRUE,
+ "use-underline", TRUE,
+ NULL));
+
gtk_widget_set_can_default (button, TRUE);
g_signal_connect (G_OBJECT (button), "clicked",
G_CALLBACK (click_close_cb), (gpointer) gsearch);
@@ -2898,8 +2920,17 @@ gsearch_app_create (GSearchWindow * gsearch)
gtk_box_pack_start (GTK_BOX (hbox), button, FALSE, FALSE, 0);
/* Find and Stop buttons... */
- gsearch->find_button = gtk_button_new_from_stock (GTK_STOCK_FIND);
- gsearch->stop_button = gtk_button_new_from_stock (GTK_STOCK_STOP);
+ gsearch->find_button = GTK_WIDGET (g_object_new (GTK_TYPE_BUTTON,
+ "label", "gtk-find",
+ "use-stock", TRUE,
+ "use-underline", TRUE,
+ NULL));
+
+ gsearch->stop_button = GTK_WIDGET (g_object_new (GTK_TYPE_BUTTON,
+ "label", "gtk-stop",
+ "use-stock", TRUE,
+ "use-underline", TRUE,
+ NULL));
gtk_widget_set_can_default (gsearch->find_button, TRUE);
gtk_widget_set_can_default (gsearch->stop_button, TRUE);