Update for e_option_menu prototype constification

* e-folder-list.c: Update for e_option_menu prototype
        constification

svn path=/trunk/; revision=20790
This commit is contained in:
Dan Winship
2003-04-09 18:02:18 +00:00
parent 69f98ea90b
commit c70fa695ca
3 changed files with 28 additions and 16 deletions
+5
View File
@@ -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.
+17 -10
View File
@@ -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
+6 -6
View File
@@ -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,