aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--shell/ChangeLog5
-rw-r--r--shell/e-folder-list.c27
-rw-r--r--shell/e-folder-list.h12
3 files changed, 28 insertions, 16 deletions
diff --git a/shell/ChangeLog b/shell/ChangeLog
index 3e955ae50f..6a88e56e79 100644
--- a/shell/ChangeLog
+++ b/shell/ChangeLog
@@ -1,3 +1,8 @@
+2003-04-09 Dan Winship <danw@ximian.com>
+
+ * e-folder-list.c: Update for e_option_menu prototype
+ constification
+
2003-04-08 Ettore Perazzoli <ettore@ximian.com>
* e-setup.c (setup_bonobo_conf_private_directory): Removed.
diff --git a/shell/e-folder-list.c b/shell/e-folder-list.c
index fff4d6c4aa..3da34b7c57 100644
--- a/shell/e-folder-list.c
+++ b/shell/e-folder-list.c
@@ -465,7 +465,7 @@ e_folder_list_init (EFolderList *efl)
}
EFolderListItem *
-e_folder_list_parse_xml (char *xml)
+e_folder_list_parse_xml (const char *xml)
{
xmlDoc *doc;
xmlNode *root;
@@ -553,7 +553,7 @@ e_folder_list_free_items (EFolderListItem *items)
}
GtkWidget*
-e_folder_list_new (EvolutionShellClient *client, char *xml)
+e_folder_list_new (EvolutionShellClient *client, const char *xml)
{
GtkWidget *widget = GTK_WIDGET (g_object_new (e_folder_list_get_type (), NULL));
@@ -562,7 +562,7 @@ e_folder_list_new (EvolutionShellClient *client, char *xml)
}
GtkWidget*
-e_folder_list_construct (EFolderList *efl, EvolutionShellClient *client, char *xml)
+e_folder_list_construct (EFolderList *efl, EvolutionShellClient *client, const char *xml)
{
g_object_ref (client);
efl->priv->client = client;
@@ -621,7 +621,7 @@ e_folder_list_get_items (EFolderList *efl)
}
void
-e_folder_list_set_xml (EFolderList *efl, char *xml)
+e_folder_list_set_xml (EFolderList *efl, const char *xml)
{
EFolderListItem *items;
@@ -644,7 +644,7 @@ e_folder_list_get_xml (EFolderList *efl)
}
void
-e_folder_list_set_option_menu_strings_from_array (EFolderList *efl, gchar **strings)
+e_folder_list_set_option_menu_strings_from_array (EFolderList *efl, const char **strings)
{
e_option_menu_set_strings_from_array (efl->priv->option_menu, strings);
if (strings && *strings)
@@ -654,15 +654,22 @@ e_folder_list_set_option_menu_strings_from_array (EFolderList *efl, gchar **stri
}
void
-e_folder_list_set_option_menu_strings (EFolderList *efl, gchar *first_label, ...)
+e_folder_list_set_option_menu_strings (EFolderList *efl, const char *first_label, ...)
{
- char **array;
+ GPtrArray *labels;
+ va_list args;
+ char *s;
- GET_STRING_ARRAY_FROM_ELLIPSIS (array, first_label);
+ labels = g_ptr_array_new ();
- e_folder_list_set_option_menu_strings_from_array (efl, array);
+ va_start (args, first_label);
+ for (s = (char *)first_label; s; s = va_arg (args, char *))
+ g_ptr_array_add (labels, s);
+ va_end (args);
- g_free (array);
+ e_folder_list_set_option_menu_strings_from_array (efl, (const char **)labels->pdata);
+
+ g_ptr_array_free (labels, TRUE);
}
int
diff --git a/shell/e-folder-list.h b/shell/e-folder-list.h
index 4259ea4a71..5e7ce3493d 100644
--- a/shell/e-folder-list.h
+++ b/shell/e-folder-list.h
@@ -77,31 +77,31 @@ typedef struct {
} EFolderListItem;
-EFolderListItem *e_folder_list_parse_xml (char *xml);
+EFolderListItem *e_folder_list_parse_xml (const char *xml);
char *e_folder_list_create_xml (EFolderListItem *items);
void e_folder_list_free_items (EFolderListItem *items);
/* Standard functions */
GtkType e_folder_list_get_type (void);
GtkWidget *e_folder_list_new (EvolutionShellClient *client,
- char *xml);
+ const char *xml);
GtkWidget *e_folder_list_construct (EFolderList *efl,
EvolutionShellClient *client,
- char *xml);
+ const char *xml);
/* data access functions */
void e_folder_list_set_items (EFolderList *efl,
EFolderListItem *items);
EFolderListItem *e_folder_list_get_items (EFolderList *efl);
void e_folder_list_set_xml (EFolderList *efl,
- char *xml);
+ const char *xml);
char *e_folder_list_get_xml (EFolderList *efl);
/* Option Menu functions */
void e_folder_list_set_option_menu_strings_from_array (EFolderList *efl,
- gchar **strings);
+ const char **strings);
void e_folder_list_set_option_menu_strings (EFolderList *efl,
- gchar *first_label,
+ const char *first_label,
...);
int e_folder_list_get_option_menu_value (EFolderList *efl);
void e_folder_list_set_option_menu_value (EFolderList *efl,