summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarlos Soriano <csoriano@gnome.org>2016-03-09 17:48:24 +0100
committerCarlos Soriano <csoriano@gnome.org>2016-03-09 17:48:24 +0100
commit572c1e48ab375fb39bff5ff5d0bd64bae55616e8 (patch)
tree74f248c75e4a3fbbbded383903af1c89ebff7240
parent2c3f46df0fad0aff0534c411aee24a0b4ef24254 (diff)
downloadnautilus-572c1e48ab375fb39bff5ff5d0bd64bae55616e8.tar.gz
content-bar: use const type for content types
This fixes warnings.
-rw-r--r--libnautilus-private/nautilus-file-utilities.c6
-rw-r--r--libnautilus-private/nautilus-file-utilities.h6
-rw-r--r--src/nautilus-window-slot.c4
-rw-r--r--src/nautilus-x-content-bar.c6
-rw-r--r--src/nautilus-x-content-bar.h2
5 files changed, 12 insertions, 12 deletions
diff --git a/libnautilus-private/nautilus-file-utilities.c b/libnautilus-private/nautilus-file-utilities.c
index 94b3e9cf1..952d010ca 100644
--- a/libnautilus-private/nautilus-file-utilities.c
+++ b/libnautilus-private/nautilus-file-utilities.c
@@ -1031,7 +1031,7 @@ get_message_for_content_type (const char *content_type)
}
char *
-get_message_for_two_content_types (char **content_types)
+get_message_for_two_content_types (const char * const *content_types)
{
char *message;
@@ -1065,7 +1065,7 @@ get_message_for_two_content_types (char **content_types)
}
gboolean
-should_handle_content_type (char *content_type)
+should_handle_content_type (const char *content_type)
{
GAppInfo *default_app;
@@ -1077,7 +1077,7 @@ should_handle_content_type (char *content_type)
}
gboolean
-should_handle_content_types (char ** content_types)
+should_handle_content_types (const char * const * content_types)
{
int i;
diff --git a/libnautilus-private/nautilus-file-utilities.h b/libnautilus-private/nautilus-file-utilities.h
index 9b39ccc5c..d3016df09 100644
--- a/libnautilus-private/nautilus-file-utilities.h
+++ b/libnautilus-private/nautilus-file-utilities.h
@@ -89,9 +89,9 @@ void nautilus_get_x_content_types_for_mount_async (GMount *mount,
GCancellable *cancellable,
gpointer user_data);
char * get_message_for_content_type (const char *content_type);
-char * get_message_for_two_content_types (char **content_types);
-gboolean should_handle_content_type (char *content_type);
-gboolean should_handle_content_types (char **content_type);
+char * get_message_for_two_content_types (const char * const *content_types);
+gboolean should_handle_content_type (const char *content_type);
+gboolean should_handle_content_types (const char * const *content_type);
gboolean nautilus_file_selection_equal (GList *selection_a, GList *selection_b);
diff --git a/src/nautilus-window-slot.c b/src/nautilus-window-slot.c
index c12453b8b..83b540513 100644
--- a/src/nautilus-window-slot.c
+++ b/src/nautilus-window-slot.c
@@ -1871,7 +1871,7 @@ typedef struct {
} FindMountData;
static void
-nautilus_window_slot_show_x_content_bar (NautilusWindowSlot *slot, GMount *mount, const char **x_content_types)
+nautilus_window_slot_show_x_content_bar (NautilusWindowSlot *slot, GMount *mount, const char * const *x_content_types)
{
GtkWidget *bar;
@@ -1899,7 +1899,7 @@ found_content_type_cb (const char **x_content_types,
slot = data->slot;
if (x_content_types != NULL && x_content_types[0] != NULL) {
- nautilus_window_slot_show_x_content_bar (slot, data->mount, x_content_types);
+ nautilus_window_slot_show_x_content_bar (slot, data->mount, (const char* const *) x_content_types);
}
slot->details->find_mount_cancellable = NULL;
diff --git a/src/nautilus-x-content-bar.c b/src/nautilus-x-content-bar.c
index 5f9ef40ff..71723fe96 100644
--- a/src/nautilus-x-content-bar.c
+++ b/src/nautilus-x-content-bar.c
@@ -80,7 +80,7 @@ content_bar_response_cb (GtkInfoBar *infobar,
}
static void
-nautilus_x_content_bar_set_x_content_types (NautilusXContentBar *bar, const char **x_content_types)
+nautilus_x_content_bar_set_x_content_types (NautilusXContentBar *bar, const char * const *x_content_types)
{
char *message = NULL;
guint num_types;
@@ -118,7 +118,7 @@ nautilus_x_content_bar_set_x_content_types (NautilusXContentBar *bar, const char
message = get_message_for_content_type (bar->priv->x_content_types[0]);
break;
case 2:
- message = get_message_for_two_content_types (bar->priv->x_content_types);
+ message = get_message_for_two_content_types ((const char* const *) bar->priv->x_content_types);
break;
default:
message = g_strdup (_("Open with:"));
@@ -302,7 +302,7 @@ nautilus_x_content_bar_init (NautilusXContentBar *bar)
GtkWidget *
nautilus_x_content_bar_new (GMount *mount,
- const char **x_content_types)
+ const char * const *x_content_types)
{
return g_object_new (NAUTILUS_TYPE_X_CONTENT_BAR,
"message-type", GTK_MESSAGE_QUESTION,
diff --git a/src/nautilus-x-content-bar.h b/src/nautilus-x-content-bar.h
index 4b0d7e674..9065e5119 100644
--- a/src/nautilus-x-content-bar.h
+++ b/src/nautilus-x-content-bar.h
@@ -53,7 +53,7 @@ typedef struct
GType nautilus_x_content_bar_get_type (void) G_GNUC_CONST;
GtkWidget *nautilus_x_content_bar_new (GMount *mount,
- const char **x_content_types);
+ const char * const* x_content_types);
G_END_DECLS