aboutsummaryrefslogtreecommitdiffstats
path: root/widgets/menus/gal-view-instance.c
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2009-05-27 22:29:19 +0800
committerMatthew Barnes <mbarnes@redhat.com>2009-05-27 22:29:19 +0800
commit948235c3d1076dbe6ed2e57a24c16a083bbd9f01 (patch)
tree4133b1adfd94d8f889ca7ad4ad851346518f4171 /widgets/menus/gal-view-instance.c
parentcc3a98fc1ad5bb87aa7335f3de404ee7feee1541 (diff)
downloadgsoc2013-evolution-948235c3d1076dbe6ed2e57a24c16a083bbd9f01.tar
gsoc2013-evolution-948235c3d1076dbe6ed2e57a24c16a083bbd9f01.tar.gz
gsoc2013-evolution-948235c3d1076dbe6ed2e57a24c16a083bbd9f01.tar.bz2
gsoc2013-evolution-948235c3d1076dbe6ed2e57a24c16a083bbd9f01.tar.lz
gsoc2013-evolution-948235c3d1076dbe6ed2e57a24c16a083bbd9f01.tar.xz
gsoc2013-evolution-948235c3d1076dbe6ed2e57a24c16a083bbd9f01.tar.zst
gsoc2013-evolution-948235c3d1076dbe6ed2e57a24c16a083bbd9f01.zip
Prefer GLib basic types over C types.
Diffstat (limited to 'widgets/menus/gal-view-instance.c')
-rw-r--r--widgets/menus/gal-view-instance.c40
1 files changed, 20 insertions, 20 deletions
diff --git a/widgets/menus/gal-view-instance.c b/widgets/menus/gal-view-instance.c
index 07dab81336..bd93b64034 100644
--- a/widgets/menus/gal-view-instance.c
+++ b/widgets/menus/gal-view-instance.c
@@ -83,14 +83,14 @@ save_current_view (GalViewInstance *instance)
xmlDoc *doc;
xmlNode *root;
- doc = xmlNewDoc((const unsigned char *)"1.0");
- root = xmlNewNode (NULL, (const unsigned char *)"GalViewCurrentView");
+ doc = xmlNewDoc((const guchar *)"1.0");
+ root = xmlNewNode (NULL, (const guchar *)"GalViewCurrentView");
xmlDocSetRootElement(doc, root);
if (instance->current_id)
- e_xml_set_string_prop_by_name (root, (const unsigned char *)"current_view", instance->current_id);
+ e_xml_set_string_prop_by_name (root, (const guchar *)"current_view", instance->current_id);
if (instance->current_type)
- e_xml_set_string_prop_by_name (root, (const unsigned char *)"current_view_type", instance->current_type);
+ e_xml_set_string_prop_by_name (root, (const guchar *)"current_view_type", instance->current_type);
if (e_xml_save_file (instance->current_view_filename, doc) == -1)
g_warning ("Unable to save view to %s - %s", instance->current_view_filename, g_strerror(errno));
@@ -225,7 +225,7 @@ static void
collection_changed (GalView *view, GalViewInstance *instance)
{
if (instance->current_id) {
- char *view_id = instance->current_id;
+ gchar *view_id = instance->current_id;
instance->current_id = NULL;
gal_view_instance_set_current_view_id (instance, view_id);
g_free (view_id);
@@ -254,7 +254,7 @@ load_current_view (GalViewInstance *instance)
instance->current_id = g_strdup (gal_view_instance_get_default_view (instance));
if (instance->current_id) {
- int index = gal_view_collection_get_view_index_by_id (instance->collection,
+ gint index = gal_view_collection_get_view_index_by_id (instance->collection,
instance->current_id);
if (index != -1) {
@@ -268,10 +268,10 @@ load_current_view (GalViewInstance *instance)
}
root = xmlDocGetRootElement(doc);
- instance->current_id = e_xml_get_string_prop_by_name_with_default (root, (const unsigned char *)"current_view", NULL);
+ instance->current_id = e_xml_get_string_prop_by_name_with_default (root, (const guchar *)"current_view", NULL);
if (instance->current_id != NULL) {
- int index = gal_view_collection_get_view_index_by_id (instance->collection,
+ gint index = gal_view_collection_get_view_index_by_id (instance->collection,
instance->current_id);
if (index != -1) {
@@ -281,8 +281,8 @@ load_current_view (GalViewInstance *instance)
}
}
if (view == NULL) {
- char *type;
- type = e_xml_get_string_prop_by_name_with_default (root, (const unsigned char *)"current_view_type", NULL);
+ gchar *type;
+ type = e_xml_get_string_prop_by_name_with_default (root, (const guchar *)"current_view_type", NULL);
view = gal_view_collection_load_view_from_file (instance->collection,
type,
instance->custom_filename);
@@ -304,7 +304,7 @@ load_current_view (GalViewInstance *instance)
* Return value: The new %GalViewInstance.
**/
GalViewInstance *
-gal_view_instance_new (GalViewCollection *collection, const char *instance_id)
+gal_view_instance_new (GalViewCollection *collection, const gchar *instance_id)
{
GalViewInstance *instance = g_object_new (GAL_VIEW_INSTANCE_TYPE, NULL);
if (gal_view_instance_construct (instance, collection, instance_id))
@@ -316,10 +316,10 @@ gal_view_instance_new (GalViewCollection *collection, const char *instance_id)
}
GalViewInstance *
-gal_view_instance_construct (GalViewInstance *instance, GalViewCollection *collection, const char *instance_id)
+gal_view_instance_construct (GalViewInstance *instance, GalViewCollection *collection, const gchar *instance_id)
{
- char *filename;
- char *safe_id;
+ gchar *filename;
+ gchar *safe_id;
g_return_val_if_fail (gal_view_collection_loaded (collection), NULL);
@@ -352,7 +352,7 @@ gal_view_instance_construct (GalViewInstance *instance, GalViewCollection *colle
}
/* Manipulate the current view. */
-char *
+gchar *
gal_view_instance_get_current_view_id (GalViewInstance *instance)
{
if (instance->current_id && gal_view_collection_get_view_index_by_id (instance->collection, instance->current_id) != -1)
@@ -362,10 +362,10 @@ gal_view_instance_get_current_view_id (GalViewInstance *instance)
}
void
-gal_view_instance_set_current_view_id (GalViewInstance *instance, const char *view_id)
+gal_view_instance_set_current_view_id (GalViewInstance *instance, const gchar *view_id)
{
GalView *view;
- int index;
+ gint index;
g_return_if_fail (instance != NULL);
g_return_if_fail (GAL_IS_VIEW_INSTANCE (instance));
@@ -408,7 +408,7 @@ gal_view_instance_set_custom_view (GalViewInstance *instance, GalView *view)
}
static void
-dialog_response(GtkWidget *dialog, int id, GalViewInstance *instance)
+dialog_response(GtkWidget *dialog, gint id, GalViewInstance *instance)
{
if (id == GTK_RESPONSE_OK) {
gal_view_instance_save_as_dialog_save (GAL_VIEW_INSTANCE_SAVE_AS_DIALOG (dialog));
@@ -436,7 +436,7 @@ gal_view_instance_load (GalViewInstance *instance)
}
/* These only mean anything before gal_view_instance_load is called the first time. */
-const char *
+const gchar *
gal_view_instance_get_default_view (GalViewInstance *instance)
{
if (instance->default_view)
@@ -446,7 +446,7 @@ gal_view_instance_get_default_view (GalViewInstance *instance)
}
void
-gal_view_instance_set_default_view (GalViewInstance *instance, const char *id)
+gal_view_instance_set_default_view (GalViewInstance *instance, const gchar *id)
{
g_free (instance->default_view);
instance->default_view = g_strdup (id);