Remove pidgin_menu_popup_at_treeview_selection and pidgin_new_menu_item which are no longer used

Mon, 22 Aug 2022 22:14:58 -0500

author
Gary Kramlich <grim@reaperworld.com>
date
Mon, 22 Aug 2022 22:14:58 -0500
changeset 41515
e91ebfe7d08c
parent 41514
a96768bacb59
child 41516
c8d3ab896cc6

Remove pidgin_menu_popup_at_treeview_selection and pidgin_new_menu_item which are no longer used

Testing Done:
Compiled

Reviewed at https://reviews.imfreedom.org/r/1620/

ChangeLog.API file | annotate | diff | comparison | revisions
pidgin/gtkutils.c file | annotate | diff | comparison | revisions
pidgin/gtkutils.h file | annotate | diff | comparison | revisions
--- a/ChangeLog.API	Mon Aug 22 22:05:55 2022 -0500
+++ b/ChangeLog.API	Mon Aug 22 22:14:58 2022 -0500
@@ -937,6 +937,8 @@
 		* pidgin_get_dim_grey_string
 		* pidgin_gdk_pixbuf_make_round, use purple_gdk_pixbuf_make_round instead.
 		* pidgin_gdk_pixbuf_is_opaque, use purple_gdk_pixbuf_is_opaque instead.
+		* pidgin_menu_popup_at_treeview_selection
+		* pidgin_new_menu_item
 		* pidgin_pixbuf_from_data, use purple_gdk_pixbuf_from_data instead.
 		* pidgin_pixbuf_anim_from_data
 		* pidgin_pixbuf_from_image, use purple_gdk_pixbuf_from_image instead.
--- a/pidgin/gtkutils.c	Mon Aug 22 22:05:55 2022 -0500
+++ b/pidgin/gtkutils.c	Mon Aug 22 22:14:58 2022 -0500
@@ -99,39 +99,6 @@
  * Code
  *****************************************************************************/
 
-GtkWidget *pidgin_new_menu_item(GtkWidget *menu, const char *mnemonic,
-                const char *icon, GCallback cb, gpointer data)
-{
-	GtkWidget *menuitem;
-	GtkWidget *box;
-	GtkWidget *label;
-
-        box = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 6);
-
-        menuitem = gtk_menu_item_new();
-
-	if (cb)
-		g_signal_connect(G_OBJECT(menuitem), "activate", cb, data);
-
-        if (icon) {
-                GtkWidget *image;
-                image = gtk_image_new_from_icon_name(icon, GTK_ICON_SIZE_MENU);
-                gtk_container_add(GTK_CONTAINER(box), image);
-        }
-
-        label = gtk_label_new_with_mnemonic(mnemonic);
-        gtk_container_add(GTK_CONTAINER(box), label);
-
-        gtk_container_add(GTK_CONTAINER(menuitem), box);
-
-	if (menu)
-		gtk_menu_shell_append(GTK_MENU_SHELL(menu), menuitem);
-
-	gtk_widget_show_all(menuitem);
-
-	return menuitem;
-}
-
 GtkWidget *
 pidgin_make_frame(GtkWidget *parent, const char *title)
 {
@@ -326,27 +293,6 @@
 	g_object_unref(set);
 }
 
-void
-pidgin_menu_popup_at_treeview_selection(GtkWidget *menu, GtkWidget *treeview)
-{
-	GtkTreePath *path;
-	GtkTreeViewColumn *column;
-	GdkWindow *bin_window;
-	GdkRectangle rect;
-
-	gtk_tree_view_get_cursor(GTK_TREE_VIEW(treeview), &path, &column);
-	g_return_if_fail(path != NULL);
-	if (column == NULL)
-		column = gtk_tree_view_get_column(GTK_TREE_VIEW(treeview), 0);
-	bin_window = gtk_tree_view_get_bin_window(GTK_TREE_VIEW(treeview));
-	gtk_tree_view_get_cell_area(GTK_TREE_VIEW(treeview), path, column, &rect);
-	gtk_menu_popup_at_rect(GTK_MENU(menu), bin_window, &rect,
-	                       GDK_GRAVITY_SOUTH_WEST, GDK_GRAVITY_NORTH_WEST,
-	                       NULL);
-
-	gtk_tree_path_free(path);
-}
-
 void pidgin_buddy_icon_get_scale_size(GdkPixbuf *buf, PurpleBuddyIconSpec *spec, PurpleBuddyIconScaleFlags rules, int *width, int *height)
 {
 	*width = gdk_pixbuf_get_width(buf);
--- a/pidgin/gtkutils.h	Mon Aug 22 22:05:55 2022 -0500
+++ b/pidgin/gtkutils.h	Mon Aug 22 22:14:58 2022 -0500
@@ -55,22 +55,6 @@
 G_BEGIN_DECLS
 
 /**
- * pidgin_new_menu_item:
- * @menu:       The menu to which to append the menu item.
- * @mnemonic:   The title for the menu item.
- * @icon:       An icon to place to the left of the menu item,
- *                   or %NULL for no icon.
- * @cb: (scope call): A function to call when the menu item is activated.
- * @data:       Data to pass to the signal function.
- *
- * Creates a menu item.
- *
- * Returns: (transfer full): The newly created menu item.
- */
-GtkWidget *pidgin_new_menu_item(GtkWidget *menu, const char *mnemonic,
-                const char *icon, GCallback cb, gpointer data);
-
-/**
  * pidgin_make_frame:
  * @parent: The widget to put the frame into.
  * @title:  The title for the frame.
@@ -149,17 +133,6 @@
 void pidgin_set_accessible_relations(GtkWidget *w, GtkLabel *l);
 
 /**
- * pidgin_menu_popup_at_treeview_selection:
- * @menu: The menu to show.
- * @treeview: The treeview to use for positioning.
- *
- * Open a menu popup at the position determined by the selection of a given
- * treeview. This function is similar to @gtk_menu_popup_at_pointer, but should
- * be used when the menu is activated via a keyboard shortcut.
- */
-void pidgin_menu_popup_at_treeview_selection(GtkWidget *menu, GtkWidget *treeview);
-
-/**
  * pidgin_buddy_icon_get_scale_size:
  *
  * Convenience wrapper for purple_buddy_icon_spec_get_scaled_size

mercurial