]> git.0d.be Git - empathy.git/commitdiff
Fix constness of various variables and parameters
authorPhilip Withnall <philip.withnall@collabora.co.uk>
Thu, 8 Jul 2010 10:56:13 +0000 (11:56 +0100)
committerPhilip Withnall <philip.withnall@collabora.co.uk>
Thu, 5 Aug 2010 14:55:12 +0000 (15:55 +0100)
libempathy-gtk/empathy-individual-store.c
libempathy-gtk/empathy-ui-utils.c
libempathy-gtk/empathy-ui-utils.h
libempathy-gtk/empathy-video-src.c
libempathy-gtk/totem-subtitle-encoding.c
libempathy/empathy-utils.c
src/empathy-accounts-dialog.c
src/empathy-call-window.c
src/empathy-import-pidgin.c

index 89cbc062a8dabe7a02d92ff0d1a86b32dca07090..2f530069c76c6d8b27b3eefdfcde01613bc9af49 100644 (file)
@@ -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;
index 703d3e37c673ae29d51fbe6074013dcf2aa5bf97..46a26d8f7bebc5a487c5813c9dfd249209dc6543 100644 (file)
@@ -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;
index 87c17b333db7e8150fedc3fcee3c60926e423449..9c3ec6517c4d5322e43f90aa804f55f979018b0a 100644 (file)
@@ -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);
index 96324e06c4a0a0ffa955ad3e55429a08851d300b..aa4d35ac2eaf55ff0248da1723616424b4494321 100644 (file)
@@ -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
index 285c5acf307ace4787ebcd4a11026c4b3476c8a1..f376ea7287ce8b24a8dc2ee6821c270ff23df02f 100644 (file)
@@ -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;
index fdc5b465de3a6cc2f9bb2789c5e271971d727046..c262c0a6f80d5c0a046952fdc19deb4a06c206f2 100644 (file)
@@ -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 },
index e7977894c4f883e3924e12830ef4b4d3f525d5b8..c41763d90065bfd532964c9bcdee43276bface9b 100644 (file)
@@ -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)
     {
index c2416ea03777a0d067a5d43bb99c0b6f80ffcde0..7376c486bebd92c224c33c35bf6fbac60caa13d0 100644 (file)
@@ -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 },
index 87910b96a9e1d15fb6dfa2c66fd9af0aed946d6d..1e9a317131fe642e4a9b2b53d8a2465799906dea 100644 (file)
@@ -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[] =