[empathy] Fix constness of various variables and parameters



commit a3faa867baeb51bb55e04fb507aaa45038f760a5
Author: Philip Withnall <philip withnall collabora co uk>
Date:   Thu Jul 8 11:56:13 2010 +0100

    Fix constness of various variables and parameters

 libempathy-gtk/empathy-individual-store.c |    4 ++--
 libempathy-gtk/empathy-ui-utils.c         |    6 +++---
 libempathy-gtk/empathy-ui-utils.h         |    2 +-
 libempathy-gtk/empathy-video-src.c        |    4 ++--
 libempathy-gtk/totem-subtitle-encoding.c  |    6 +++---
 libempathy/empathy-utils.c                |    2 +-
 src/empathy-accounts-dialog.c             |    6 +++---
 src/empathy-call-window.c                 |    2 +-
 src/empathy-import-pidgin.c               |    6 +++---
 9 files changed, 19 insertions(+), 19 deletions(-)
---
diff --git a/libempathy-gtk/empathy-individual-store.c b/libempathy-gtk/empathy-individual-store.c
index 89cbc06..2f53006 100644
--- a/libempathy-gtk/empathy-individual-store.c
+++ b/libempathy-gtk/empathy-individual-store.c
@@ -781,7 +781,7 @@ individual_store_remove_individual_and_disconnect (
 
 static void
 individual_store_members_changed_cb (EmpathyIndividualManager *manager,
-    gchar *message,
+    const gchar *message,
     GList *added,
     GList *removed,
     guint reason,
@@ -902,7 +902,7 @@ individual_store_member_renamed_cb (EmpathyIndividualManager *manager,
     FolksIndividual *old_individual,
     FolksIndividual *new_individual,
     guint reason,
-    gchar *message,
+    const gchar *message,
     EmpathyIndividualStore *self)
 {
   EmpathyIndividualStorePriv *priv;
diff --git a/libempathy-gtk/empathy-ui-utils.c b/libempathy-gtk/empathy-ui-utils.c
index 703d3e3..46a26d8 100644
--- a/libempathy-gtk/empathy-ui-utils.c
+++ b/libempathy-gtk/empathy-ui-utils.c
@@ -129,9 +129,9 @@ empathy_builder_get_file (const gchar *filename,
 }
 
 void
-empathy_builder_connect (GtkBuilder *gui,
-			 gpointer    user_data,
-			 gchar      *first_object,
+empathy_builder_connect (GtkBuilder  *gui,
+			 gpointer     user_data,
+			 const gchar *first_object,
 			 ...)
 {
 	va_list      args;
diff --git a/libempathy-gtk/empathy-ui-utils.h b/libempathy-gtk/empathy-ui-utils.h
index 87c17b3..9c3ec65 100644
--- a/libempathy-gtk/empathy-ui-utils.h
+++ b/libempathy-gtk/empathy-ui-utils.h
@@ -61,7 +61,7 @@ GtkBuilder *    empathy_builder_get_file                (const gchar      *filen
 							 ...);
 void            empathy_builder_connect                 (GtkBuilder       *gui,
 							 gpointer          user_data,
-							 gchar            *first_object,
+							 const gchar      *first_object,
 							 ...);
 GtkWidget     *empathy_builder_unref_and_keep_widget    (GtkBuilder       *gui,
 							 GtkWidget        *root);
diff --git a/libempathy-gtk/empathy-video-src.c b/libempathy-gtk/empathy-video-src.c
index 96324e0..aa4d35a 100644
--- a/libempathy-gtk/empathy-video-src.c
+++ b/libempathy-gtk/empathy-video-src.c
@@ -29,8 +29,8 @@
 G_DEFINE_TYPE(EmpathyGstVideoSrc, empathy_video_src, GST_TYPE_BIN)
 
 /* Keep in sync with EmpathyGstVideoSrcChannel */
-static gchar *channel_names[NR_EMPATHY_GST_VIDEO_SRC_CHANNELS] = { "contrast",
-  "brightness", "gamma" };
+static const gchar *channel_names[NR_EMPATHY_GST_VIDEO_SRC_CHANNELS] = {
+  "contrast", "brightness", "gamma" };
 
 /* signal enum */
 #if 0
diff --git a/libempathy-gtk/totem-subtitle-encoding.c b/libempathy-gtk/totem-subtitle-encoding.c
index 285c5ac..f376ea7 100644
--- a/libempathy-gtk/totem-subtitle-encoding.c
+++ b/libempathy-gtk/totem-subtitle-encoding.c
@@ -147,8 +147,8 @@ typedef struct
 {
   int index;
   gboolean valid;
-  char *charset;
-  char *name;
+  const char *charset;
+  const char *name;
 } SubtitleEncoding;
 
 
@@ -483,7 +483,7 @@ static GtkTreeModel *
 subtitle_encoding_create_store (void)
 {
   gchar *label;
-  gchar *lastlang = "";
+  const gchar *lastlang = "";
   GtkTreeIter iter, iter2;
   GtkTreeStore *store;
   int i;
diff --git a/libempathy/empathy-utils.c b/libempathy/empathy-utils.c
index fdc5b46..c262c0a 100644
--- a/libempathy/empathy-utils.c
+++ b/libempathy/empathy-utils.c
@@ -57,7 +57,7 @@
 
 /* Translation between presence types and string */
 static struct {
-	gchar *name;
+	const gchar *name;
 	TpConnectionPresenceType type;
 } presence_types[] = {
 	{ "available", TP_CONNECTION_PRESENCE_TYPE_AVAILABLE },
diff --git a/src/empathy-accounts-dialog.c b/src/empathy-accounts-dialog.c
index e797789..c41763d 100644
--- a/src/empathy-accounts-dialog.c
+++ b/src/empathy-accounts-dialog.c
@@ -472,7 +472,7 @@ account_dialog_create_settings_widget (EmpathyAccountsDialog *dialog,
     EmpathyAccountSettings *settings)
 {
   EmpathyAccountsDialogPriv *priv = GET_PRIV (dialog);
-  gchar                     *icon_name;
+  const gchar               *icon_name;
   TpAccount                 *account;
 
   priv->setting_widget_object =
@@ -2299,7 +2299,7 @@ empathy_accounts_dialog_show_application (GdkScreen *screen,
     gboolean hidden)
 {
   GError *error = NULL;
-  gchar *argv[4] = { NULL, };
+  const gchar *argv[4] = { NULL, };
   gint i = 0;
   gchar *account_option = NULL;
   gchar *path;
@@ -2341,7 +2341,7 @@ empathy_accounts_dialog_show_application (GdkScreen *screen,
     selected_account == NULL ? "<none selected>" :
       tp_proxy_get_object_path (TP_PROXY (selected_account)));
 
-  gdk_spawn_on_screen (screen, NULL, argv, NULL, G_SPAWN_SEARCH_PATH,
+  gdk_spawn_on_screen (screen, NULL, (gchar**) argv, NULL, G_SPAWN_SEARCH_PATH,
       NULL, NULL, NULL, &error);
   if (error != NULL)
     {
diff --git a/src/empathy-call-window.c b/src/empathy-call-window.c
index c2416ea..7376c48 100644
--- a/src/empathy-call-window.c
+++ b/src/empathy-call-window.c
@@ -376,7 +376,7 @@ empathy_call_window_create_dtmf (EmpathyCallWindow *self)
   int i;
   GQuark button_quark;
   struct {
-    gchar *label;
+    const gchar *label;
     TpDTMFEvent event;
   } dtmfbuttons[] = { { "1", TP_DTMF_EVENT_DIGIT_1 },
                       { "2", TP_DTMF_EVENT_DIGIT_2 },
diff --git a/src/empathy-import-pidgin.c b/src/empathy-import-pidgin.c
index 87910b9..1e9a317 100644
--- a/src/empathy-import-pidgin.c
+++ b/src/empathy-import-pidgin.c
@@ -45,9 +45,9 @@
 /* Pidgin to CM map */
 typedef struct
 {
-  gchar *protocol;
-  gchar *pidgin_name;
-  gchar *cm_name;
+  const gchar *protocol;
+  const gchar *pidgin_name;
+  const gchar *cm_name;
 } PidginCmMapItem;
 
 static PidginCmMapItem pidgin_cm_map[] =



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