[gnome-core] char*'s in applets



Hi,

Is there a specific reason why some functions in applet.h and
applet_widget.h use char*'s for character arguments instead of const
char*'s? In other words, is there an objection not to commit the patch
attached to HEAD?

-- 
   .--= ULLA! =----------------------------.  finger cactus@cactus.rulez.org
   \      http://cactus.rulez.org           \   for PGP public key
    `----------= cactus@cactus.rulez.org =--'
Me and you and a Borg named Hugh...
Index: applet-widget.c
===================================================================
RCS file: /cvs/gnome/gnome-core/panel/applet-widget.c,v
retrieving revision 1.94
diff -u -r1.94 applet-widget.c
--- applet-widget.c	1999/11/22 21:36:46	1.94
+++ applet-widget.c	1999/12/02 19:10:06
@@ -527,8 +527,8 @@
 
 void
 applet_widget_register_callback(AppletWidget *applet,
-				char *name,
-				char *menutext,
+				const char *name,
+				const char *menutext,
 				AppletCallbackFunc func,
 				gpointer data)
 {
@@ -544,9 +544,9 @@
 
 void
 applet_widget_register_stock_callback(AppletWidget *applet,
-				      char *name,
-				      char *stock_type,
-				      char *menutext,
+				      const char *name,
+				      const char *stock_type,
+				      const char *menutext,
 				      AppletCallbackFunc func,
 				      gpointer data)
 {
@@ -563,7 +563,7 @@
 
 void
 applet_widget_unregister_callback(AppletWidget *applet,
-				  char *name)
+				  const char *name)
 {
 	GSList *ltmp;
 	CallbackInfo *cbi = NULL;
@@ -594,9 +594,9 @@
 
 static void
 gnome_panel_applet_register_callback_dir(GtkWidget *applet,
-					 char *name,
-					 char *stock_item,
-					 char *menutext)
+					 const char *name,
+					 const char *stock_item,
+					 const char *menutext)
 {
 	char *n;
 	CORBA_Environment ev;
@@ -620,8 +620,8 @@
 
 void
 applet_widget_register_callback_dir(AppletWidget *applet,
-				    char *name,
-				    char *menutext)
+				    const char *name,
+				    const char *menutext)
 {
 	g_return_if_fail(applet != NULL);
 	g_return_if_fail(IS_APPLET_WIDGET(applet));
@@ -633,9 +633,9 @@
 }
 void
 applet_widget_register_stock_callback_dir(AppletWidget *applet,
-					  char *name,
-					  char *stock_type,
-					  char *menutext)
+					  const char *name,
+					  const char *stock_type,
+					  const char *menutext)
 {
 	g_return_if_fail(applet != NULL);
 	g_return_if_fail(IS_APPLET_WIDGET(applet));
@@ -648,7 +648,7 @@
 }
 
 void
-applet_widget_unregister_callback_dir(AppletWidget *applet, char *name)
+applet_widget_unregister_callback_dir(AppletWidget *applet, const char *name)
 {
 	CORBA_Environment ev;
 	char *n;
@@ -673,7 +673,7 @@
 
 void
 applet_widget_callback_set_sensitive(AppletWidget *applet,
-				     char *name,
+				     const char *name,
 				     int sensitive)
 {
 	CORBA_Environment ev;
@@ -906,7 +906,7 @@
 void
 applet_widget_set_widget_tooltip(AppletWidget *applet,
 				 GtkWidget *widget,
-				 char *text)
+				 const char *text)
 {
 	g_return_if_fail(applet != NULL);
 	g_return_if_fail(IS_APPLET_WIDGET(applet));
@@ -920,7 +920,7 @@
 }
 
 void
-applet_widget_set_tooltip(AppletWidget *applet, char *text)
+applet_widget_set_tooltip(AppletWidget *applet, const char *text)
 {
 	CORBA_Environment ev;
 	g_return_if_fail(applet != NULL);
Index: applet-widget.h
===================================================================
RCS file: /cvs/gnome/gnome-core/panel/applet-widget.h,v
retrieving revision 1.50
diff -u -r1.50 applet-widget.h
--- applet-widget.h	1999/11/21 21:36:12	1.50
+++ applet-widget.h	1999/12/02 19:10:06
@@ -158,12 +158,12 @@
 
 /*set tooltip over the applet, NULL to remove a tooltip*/
 void		applet_widget_set_tooltip	(AppletWidget *applet,
-						 char *text);
+						 const char *text);
 
 /*set tooltip on a specific widget inside the applet*/
 void		applet_widget_set_widget_tooltip(AppletWidget *applet,
 						 GtkWidget *widget,
-						 char *text);
+						 const char *text);
 
 /* add a widget to the plug and register the applet, this has to
    be done after all the children had been added so that the applet-lib
@@ -196,36 +196,36 @@
 */
 /*add a callback onto the applet's right click menu*/
 void		applet_widget_register_callback	(AppletWidget *applet,
-						 char *name,
-						 char *menutext,
+						 const char *name,
+						 const char *menutext,
 						 AppletCallbackFunc func,
 						 gpointer data);
 void		applet_widget_register_stock_callback	(AppletWidget *applet,
-							 char *name,
-							 char *stock_type,
-							 char *menutext,
+							 const char *name,
+							 const char *stock_type,
+							 const char *menutext,
 							 AppletCallbackFunc func,
 							 gpointer data);
 
 /*remove a menuitem*/
 void		applet_widget_unregister_callback (AppletWidget *applet,
-						   char *name);
+						   const char *name);
 
 /*add a submenu*/
 void		applet_widget_register_callback_dir (AppletWidget *applet,
-						     char *name,
-						     char *menutext);
+						     const char *name,
+						     const char *menutext);
 void		applet_widget_register_stock_callback_dir (AppletWidget *applet,
-							   char *name,
-							   char *stock_type,
-							   char *menutext);
+							   const char *name,
+							   const char *stock_type,
+							   const char *menutext);
 /*remove a submenu*/
 void		applet_widget_unregister_callback_dir (AppletWidget *applet,
-						       char *name);
+						       const char *name);
 
 /*enable/disable a menu entry*/
 void		applet_widget_callback_set_sensitive	(AppletWidget *applet,
-							 char *name,
+							 const char *name,
 							 int sensitive);
 
 /*get thenumber of applets*/
Index: applet.c
===================================================================
RCS file: /cvs/gnome/gnome-core/panel/applet.c,v
retrieving revision 1.49
diff -u -r1.49 applet.c
--- applet.c	1999/10/08 01:31:59	1.49
+++ applet.c	1999/12/02 19:10:06
@@ -138,7 +138,7 @@
 }
 
 static AppletUserMenu *
-applet_get_callback(GList *user_menu, char *name)
+applet_get_callback(GList *user_menu, const char *name)
 {
 	GList *list;
 	for(list=user_menu;list!=NULL;list=g_list_next(list)) {
@@ -151,9 +151,9 @@
 
 void
 applet_add_callback(AppletInfo *info,
-		    char *callback_name,
-		    char *stock_item,
-		    char *menuitem_text)
+		    const char *callback_name,
+		    const char *stock_item,
+		    const char *menuitem_text)
 {
 	AppletUserMenu *menu;
 
@@ -193,7 +193,7 @@
 }
 
 void
-applet_remove_callback(AppletInfo *info, char *callback_name)
+applet_remove_callback(AppletInfo *info, const char *callback_name)
 {
 	AppletUserMenu *menu;
 
@@ -226,7 +226,7 @@
 }
 
 void
-applet_callback_set_sensitive(AppletInfo *info, char *callback_name, int sensitive)
+applet_callback_set_sensitive(AppletInfo *info, const char *callback_name, int sensitive)
 {
 	AppletUserMenu *menu;
 
Index: applet.h
===================================================================
RCS file: /cvs/gnome/gnome-core/panel/applet.h,v
retrieving revision 1.11
diff -u -r1.11 applet.h
--- applet.h	1999/09/28 07:05:31	1.11
+++ applet.h	1999/12/02 19:10:06
@@ -64,13 +64,13 @@
 /*applet menu stuff*/
 void create_applet_menu(AppletInfo *info);
 void applet_add_callback(AppletInfo *info,
-			 char *callback_name,
-			 char *stock_item,
-			 char *menuitem_text);
+			 const char *callback_name,
+			 const char *stock_item,
+			 const char *menuitem_text);
 void applet_remove_callback(AppletInfo *info,
-			    char *callback_name);
+			    const char *callback_name);
 void applet_callback_set_sensitive(AppletInfo *info,
-				   char *callback_name,
+				   const char *callback_name,
 				   int sensitive);
 void show_applet_menu(AppletInfo *info, GdkEventButton *event);
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]