diff options
author | zhuyaliang <[email protected]> | 2023-05-22 16:08:33 +0800 |
---|---|---|
committer | raveit65 <[email protected]> | 2023-05-23 18:42:37 +0200 |
commit | 757b4728baab9f96808e05ab3d7fc5341b57f11a (patch) | |
tree | c73b8e86a91d18d111e232efa321c96b3981a720 /gsearchtool | |
parent | 6e250f4179dfdd1120857e4ac7fc1fb10da91348 (diff) | |
download | mate-utils-757b4728baab9f96808e05ab3d7fc5341b57f11a.tar.bz2 mate-utils-757b4728baab9f96808e05ab3d7fc5341b57f11a.tar.xz |
Remove init_stock_icons code and replace gtk_drag_set_icon_stock with gtk_drag_set_icon_name
Diffstat (limited to 'gsearchtool')
-rw-r--r-- | gsearchtool/src/gsearchtool-callbacks.c | 4 | ||||
-rw-r--r-- | gsearchtool/src/gsearchtool.c | 36 |
2 files changed, 2 insertions, 38 deletions
diff --git a/gsearchtool/src/gsearchtool-callbacks.c b/gsearchtool/src/gsearchtool-callbacks.c index caca5dff..737ca064 100644 --- a/gsearchtool/src/gsearchtool-callbacks.c +++ b/gsearchtool/src/gsearchtool-callbacks.c @@ -1614,7 +1614,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-dnd-multiple", 0, 0); + gtk_drag_set_icon_name (context, "gtk-dnd-multiple", 0, 0); } else if (number_of_selected_rows == 1) { GdkPixbuf * pixbuf; @@ -1637,7 +1637,7 @@ drag_begin_file_cb (GtkWidget * widget, gtk_drag_set_icon_pixbuf (context, pixbuf, 0, 0); } else { - gtk_drag_set_icon_stock (context, "gtk-dnd", 0, 0); + gtk_drag_set_icon_name (context, "gtk-dnd", 0, 0); } } } diff --git a/gsearchtool/src/gsearchtool.c b/gsearchtool/src/gsearchtool.c index ae637dc5..528f3783 100644 --- a/gsearchtool/src/gsearchtool.c +++ b/gsearchtool/src/gsearchtool.c @@ -52,7 +52,6 @@ #include "gsearchtool-entry.h" #define MATE_SEARCH_TOOL_DEFAULT_ICON_SIZE 16 -#define MATE_SEARCH_TOOL_STOCK "panel-searchtool" #define MATE_SEARCH_TOOL_REFRESH_DURATION 50000 #define LEFT_LABEL_SPACING " " @@ -2499,39 +2498,6 @@ create_search_results_section (GSearchWindow * gsearch) return vbox; } -static void -register_gsearchtool_icon (GtkIconFactory * factory) -{ - GtkIconSource * source; - GtkIconSet * icon_set; - - source = gtk_icon_source_new (); - - gtk_icon_source_set_icon_name (source, MATE_SEARCH_TOOL_ICON); - - icon_set = gtk_icon_set_new (); - gtk_icon_set_add_source (icon_set, source); - - gtk_icon_factory_add (factory, MATE_SEARCH_TOOL_STOCK, icon_set); - - gtk_icon_set_unref (icon_set); - - gtk_icon_source_free (source); -} - -static void -gsearchtool_init_stock_icons (void) -{ - GtkIconFactory * factory; - - factory = gtk_icon_factory_new (); - gtk_icon_factory_add_default (factory); - - register_gsearchtool_icon (factory); - - g_object_unref (factory); -} - void set_clone_command (GSearchWindow * gsearch, gint * argcp, @@ -3077,8 +3043,6 @@ main (int argc, g_set_application_name (_("Search for Files")); gtk_window_set_default_icon_name (MATE_SEARCH_TOOL_ICON); - gsearchtool_init_stock_icons (); - window = g_object_new (GSEARCH_TYPE_WINDOW, NULL); gsearch = GSEARCH_WINDOW (window); |