[frogr] Removed unused variables



commit 9943333819bd11b5a17fea3abbf61a1f54857c90
Author: Mario Sanchez Prada <msanchez igalia com>
Date:   Thu Apr 21 08:55:26 2011 +0200

    Removed unused variables

 src/flicksoup/fsp-session.c |    4 +---
 src/frogr-add-tags-dialog.c |    6 +-----
 src/frogr-config.c          |    3 ---
 src/frogr-controller.c      |    6 ------
 src/frogr-details-dialog.c  |    4 +---
 5 files changed, 3 insertions(+), 20 deletions(-)
---
diff --git a/src/flicksoup/fsp-session.c b/src/flicksoup/fsp-session.c
index 9da6702..2c4ed0a 100644
--- a/src/flicksoup/fsp-session.c
+++ b/src/flicksoup/fsp-session.c
@@ -985,14 +985,12 @@ _soup_session_cancelled_cb              (GCancellable *cancellable,
                                          gpointer      data)
 {
   AsyncRequestData *clos = NULL;
-  GObject *object = NULL;
   SoupSession *session = NULL;
   SoupMessage *message = NULL;
 
   clos = (AsyncRequestData *) data;
 
   /* Get data from closure, and free it */
-  object = clos->object;
   session = clos->soup_session;
   message = clos->soup_message;
 
@@ -1851,7 +1849,7 @@ fsp_session_create_photoset_async       (FspSession          *self,
 
   /* Perform the async request */
   soup_session = _get_soup_session (self);
-  _perform_async_request (priv->soup_session, url,
+  _perform_async_request (soup_session, url,
                           _create_photoset_soup_session_cb, G_OBJECT (self),
                           cancellable, callback, fsp_session_create_photoset_async, data);
 
diff --git a/src/frogr-add-tags-dialog.c b/src/frogr-add-tags-dialog.c
index 8a2f846..7a4bb29 100644
--- a/src/frogr-add-tags-dialog.c
+++ b/src/frogr-add-tags-dialog.c
@@ -96,7 +96,6 @@ _tag_list_completion_func (GtkEntryCompletion *completion, const gchar *key,
 {
   FrogrAddTagsDialog *self = NULL;
   FrogrAddTagsDialogPrivate *priv = NULL;
-  const gchar *entry_text = NULL;
   gchar *stripped_entry_text = NULL;
   gchar *basetext = NULL;
   gchar *tag = NULL;
@@ -119,7 +118,6 @@ _tag_list_completion_func (GtkEntryCompletion *completion, const gchar *key,
     return FALSE;
 
   /* Look for the last token in 'key' */
-  entry_text = gtk_entry_get_text (GTK_ENTRY (priv->entry));
   stripped_entry_text = gtk_editable_get_chars (GTK_EDITABLE (priv->entry), 0, cursor_pos);
   stripped_entry_text = g_strstrip (stripped_entry_text);
   basetext = g_strrstr (stripped_entry_text, " ");
@@ -157,7 +155,7 @@ _completion_match_selected_cb (GtkEntryCompletion *widget, GtkTreeModel *model,
   glong matching_text_len = 0;
 
   self = FROGR_ADD_TAGS_DIALOG (data);
-  priv = FROGR_ADD_TAGS_DIALOG_GET_PRIVATE (data);
+  priv = FROGR_ADD_TAGS_DIALOG_GET_PRIVATE (self);
   gtk_tree_model_get (model, iter, TEXT_COL, &tag, -1);
 
   entry_text = gtk_entry_get_text (GTK_ENTRY (priv->entry));
@@ -204,12 +202,10 @@ _dialog_response_cb (GtkDialog *dialog, gint response, gpointer data)
         {
           FrogrPicture *picture;
           GSList *item;
-          guint n_pictures;
 
           DEBUG ("Adding tags to picture(s): %s", tags);
 
           /* Iterate over the rest of elements */
-          n_pictures = g_slist_length (priv->pictures);
           for (item = priv->pictures; item; item = g_slist_next (item))
             {
               picture = FROGR_PICTURE (item->data);
diff --git a/src/frogr-config.c b/src/frogr-config.c
index e98d1ab..25a8cfe 100644
--- a/src/frogr-config.c
+++ b/src/frogr-config.c
@@ -365,7 +365,6 @@ _load_proxy_data_xml (FrogrConfig *self,
 static void
 _load_accounts (FrogrConfig *self, const gchar *config_dir)
 {
-  FrogrConfigPrivate *priv = NULL;
   gchar *xml_path = NULL;
   xmlNodePtr node = NULL;
   xmlDocPtr xml = NULL;
@@ -373,8 +372,6 @@ _load_accounts (FrogrConfig *self, const gchar *config_dir)
   g_return_if_fail (FROGR_IS_CONFIG (self));
   g_return_if_fail (config_dir != NULL);
 
-  priv = FROGR_CONFIG_GET_PRIVATE (self);
-
   xml_path = g_build_filename (config_dir, ACCOUNTS_FILENAME, NULL);
   if (g_file_test (xml_path, G_FILE_TEST_IS_REGULAR))
     xml = xmlParseFile (xml_path);
diff --git a/src/frogr-controller.c b/src/frogr-controller.c
index 3e5babf..0bb4806 100644
--- a/src/frogr-controller.c
+++ b/src/frogr-controller.c
@@ -422,13 +422,11 @@ _complete_auth_cb (GObject *object, GAsyncResult *result, gpointer data)
 {
   FspSession *session = NULL;
   FrogrController *controller = NULL;
-  FrogrControllerPrivate *priv = NULL;
   FspDataAuthToken *auth_token = NULL;
   GError *error = NULL;
 
   session = FSP_SESSION (object);
   controller = FROGR_CONTROLLER (data);
-  priv = FROGR_CONTROLLER_GET_PRIVATE (controller);
 
   auth_token = fsp_session_complete_auth_finish (session, result, &error);
   if (auth_token)
@@ -1923,12 +1921,10 @@ frogr_controller_set_proxy (FrogrController *self,
     fsp_session_set_http_proxy (priv->session, NULL, NULL, NULL, NULL);
     DEBUG ("%s", "Not using HTTP proxy");
   } else {
-    gboolean has_port = FALSE;
     gboolean has_username = FALSE;
     gboolean has_password = FALSE;
     gchar *auth_part = NULL;
 
-    has_port = (port != NULL && *port != '\0');
     has_username = (username != NULL && *username != '\0');
     has_password = (password != NULL && *password != '\0');
 
@@ -1986,11 +1982,9 @@ frogr_controller_show_details_dialog (FrogrController *self,
 
   FrogrControllerPrivate *priv = NULL;
   FrogrMainViewModel *mainview_model = NULL;
-  GSList *tags_list = NULL;
 
   priv = FROGR_CONTROLLER_GET_PRIVATE (self);
   mainview_model = frogr_main_view_get_model (priv->mainview);
-  tags_list = frogr_main_view_model_get_tags_list (mainview_model);
 
   if (frogr_config_get_tags_autocompletion (priv->config))
     {
diff --git a/src/frogr-details-dialog.c b/src/frogr-details-dialog.c
index 1f48d93..e54fd70 100644
--- a/src/frogr-details-dialog.c
+++ b/src/frogr-details-dialog.c
@@ -409,7 +409,6 @@ _tag_list_completion_func (GtkEntryCompletion *completion, const gchar *key,
 {
   FrogrDetailsDialog *self = NULL;
   FrogrDetailsDialogPrivate *priv = NULL;
-  const gchar *entry_text = NULL;
   gchar *stripped_entry_text = NULL;
   gchar *basetext = NULL;
   gchar *tag = NULL;
@@ -432,7 +431,6 @@ _tag_list_completion_func (GtkEntryCompletion *completion, const gchar *key,
     return FALSE;
 
   /* Look for the last token in 'key' */
-  entry_text = gtk_entry_get_text (GTK_ENTRY (priv->tags_entry));
   stripped_entry_text = gtk_editable_get_chars (GTK_EDITABLE (priv->tags_entry), 0, cursor_pos);
   stripped_entry_text = g_strstrip (stripped_entry_text);
   basetext = g_strrstr (stripped_entry_text, " ");
@@ -470,7 +468,7 @@ _completion_match_selected_cb (GtkEntryCompletion *widget, GtkTreeModel *model,
   glong matching_text_len = 0;
 
   self = FROGR_DETAILS_DIALOG (data);
-  priv = FROGR_DETAILS_DIALOG_GET_PRIVATE (data);
+  priv = FROGR_DETAILS_DIALOG_GET_PRIVATE (self);
   gtk_tree_model_get (model, iter, TEXT_COL, &tag, -1);
 
   entry_text = gtk_entry_get_text (GTK_ENTRY (priv->tags_entry));



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