changeset 5162:b8eafeb874a1

[gaim-migrate @ 5526] After my last commit, Nathan promptly asked me if I remembered to move the declarations for gaim_new_item and gaim_new_item_stock from one .h file to the next, and I promptly cracked on his mom. Robot101, or anyone else cool, if you want to fix the comments in gtkutils.h for these 2 functions, that'd be terrif. committer: Tailor Script <tailor@pidgin.im>
author Mark Doliner <mark@kingant.net>
date Fri, 18 Apr 2003 03:40:54 +0000
parents 777f56b95a92
children 354518ac4e11
files src/gtkutils.c src/gtkutils.h src/ui.h
diffstat 3 files changed, 48 insertions(+), 26 deletions(-) [+]
line wrap: on
line diff
--- a/src/gtkutils.c	Fri Apr 18 03:26:42 2003 +0000
+++ b/src/gtkutils.c	Fri Apr 18 03:40:54 2003 +0000
@@ -402,6 +402,27 @@
 	gtk_menu_shell_append(GTK_MENU_SHELL(menu), menuitem);
 }
 
+GtkWidget *gaim_new_item(GtkWidget *menu, const char *str)
+{
+	GtkWidget *menuitem;
+	GtkWidget *label;
+
+	menuitem = gtk_menu_item_new();
+	if (menu)
+		gtk_menu_shell_append(GTK_MENU_SHELL(menu), menuitem);
+	gtk_widget_show(menuitem);
+
+	label = gtk_label_new(str);
+	gtk_label_set_pattern(GTK_LABEL(label), "_");
+	gtk_container_add(GTK_CONTAINER(menuitem), label);
+	gtk_widget_show(label);
+/* FIXME: Go back and fix this 
+	gtk_widget_add_accelerator(menuitem, "activate", accel, str[0],
+				   GDK_MOD1_MASK, GTK_ACCEL_LOCKED);
+*/
+	return menuitem;
+}
+
 GtkWidget *gaim_new_item_from_stock(GtkWidget *menu, const char *str, const char *icon, GtkSignalFunc sf, gpointer data, guint accel_key, guint accel_mods, char *mod)
 {
 	GtkWidget *menuitem;
@@ -444,24 +465,3 @@
 
 	return menuitem;
 }
-
-GtkWidget *gaim_new_item(GtkWidget *menu, const char *str)
-{
-	GtkWidget *menuitem;
-	GtkWidget *label;
-
-	menuitem = gtk_menu_item_new();
-	if (menu)
-		gtk_menu_shell_append(GTK_MENU_SHELL(menu), menuitem);
-	gtk_widget_show(menuitem);
-
-	label = gtk_label_new(str);
-	gtk_label_set_pattern(GTK_LABEL(label), "_");
-	gtk_container_add(GTK_CONTAINER(menuitem), label);
-	gtk_widget_show(label);
-/* FIXME: Go back and fix this 
-	gtk_widget_add_accelerator(menuitem, "activate", accel, str[0],
-				   GDK_MOD1_MASK, GTK_ACCEL_LOCKED);
-*/
-	return menuitem;
-}
--- a/src/gtkutils.h	Fri Apr 18 03:26:42 2003 +0000
+++ b/src/gtkutils.h	Fri Apr 18 03:40:54 2003 +0000
@@ -111,8 +111,34 @@
 /**
  * Adds a seperator to a menu.
  *
- * @param menu   The menu to add a seperator to.
+ * @param menu The menu to add a seperator to.
  */
 void gaim_separator(GtkWidget *menu);
 
+/**
+ * Creates a menu item.
+ *
+ * @param menu The menu to which to append the menu item.
+ * @param str  The title to use for the newly created menu item.
+ *
+ * @return The newly created menu item.
+ */
+GtkWidget *gaim_new_item(GtkWidget *menu, const char *str);  
+
+/**
+ * Creates a menu item.
+ *
+ * @param menu       The menu to which to append the menu item.
+ * @param str        The title for the menu item.
+ * @param icon       An icon to place to the left of the menu item, or NULL for no icon.
+ * @param sf         A function to call when the menu item is activated.
+ * @param data       Data to pass to the signal function.
+ * @param accel_key  Something.
+ * @param accel_mods Something.
+ * @param mod        Something.
+ *
+ * @return The newly created menu item.
+ */
+GtkWidget *gaim_new_item_from_stock(GtkWidget *menu, const char *str, const char *icon, GtkSignalFunc sf, gpointer data, guint accel_key, guint accel_mods, char *mod);
+
 #endif /* _GAIM_GTK_UTILS_H_ */
--- a/src/ui.h	Fri Apr 18 03:26:42 2003 +0000
+++ b/src/ui.h	Fri Apr 18 03:40:54 2003 +0000
@@ -340,8 +340,4 @@
 extern void load_smiley_theme(const char *file, gboolean load);
 extern GSList *get_proto_smileys(int protocol);
 
-/* Fucnctions in util.c */
-extern GtkWidget *gaim_new_item(GtkWidget *menu, const char *str);
-extern GtkWidget *gaim_new_item_from_stock(GtkWidget *, const char *, const char *, GtkSignalFunc, gpointer, guint, guint, char *);
-
 #endif /* _UI_H_ */