[frogr] Fetch tags if needed after re-enabling tags autocompletion
- From: Mario Sanchez Prada <msanchez src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [frogr] Fetch tags if needed after re-enabling tags autocompletion
- Date: Sat, 7 May 2011 15:31:36 +0000 (UTC)
commit 0cceec5a435626d51b15505bf3dfdf767cc5ef49
Author: Mario Sanchez Prada <msanchez igalia com>
Date: Sat May 7 17:30:09 2011 +0200
Fetch tags if needed after re-enabling tags autocompletion
src/frogr-controller.c | 11 +++++++++++
src/frogr-controller.h | 2 ++
src/frogr-settings-dialog.c | 4 ++++
3 files changed, 17 insertions(+), 0 deletions(-)
---
diff --git a/src/frogr-controller.c b/src/frogr-controller.c
index 5ec32e7..916b148 100644
--- a/src/frogr-controller.c
+++ b/src/frogr-controller.c
@@ -2020,6 +2020,17 @@ frogr_controller_set_proxy (FrogrController *self,
}
void
+frogr_controller_fetch_tags_if_needed (FrogrController *self)
+{
+ g_return_if_fail(FROGR_IS_CONTROLLER (self));
+
+ FrogrControllerPrivate *priv = FROGR_CONTROLLER_GET_PRIVATE (self);
+
+ if (!priv->fetching_tags && !priv->tags_fetched)
+ _fetch_tags (self);
+}
+
+void
frogr_controller_show_about_dialog (FrogrController *self)
{
g_return_if_fail(FROGR_IS_CONTROLLER (self));
diff --git a/src/frogr-controller.h b/src/frogr-controller.h
index fd2e39a..bc27971 100644
--- a/src/frogr-controller.h
+++ b/src/frogr-controller.h
@@ -84,6 +84,8 @@ void frogr_controller_set_proxy (FrogrController *self,
const char *host, const char *port,
const char *username, const char *password);
+void frogr_controller_fetch_tags_if_needed (FrogrController *self);
+
void frogr_controller_show_about_dialog (FrogrController *self);
void frogr_controller_show_auth_dialog (FrogrController *self);
diff --git a/src/frogr-settings-dialog.c b/src/frogr-settings-dialog.c
index 8258a36..6344123 100644
--- a/src/frogr-settings-dialog.c
+++ b/src/frogr-settings-dialog.c
@@ -664,6 +664,10 @@ static void _dialog_response_cb (GtkDialog *dialog, gint response, gpointer data
if (response == GTK_RESPONSE_OK && _save_data (self) == FALSE)
return;
+ /* Fetch tags if needed */
+ if (!priv->disable_tags_autocompletion)
+ frogr_controller_fetch_tags_if_needed (priv->controller);
+
/* Update proxy status */
if (priv->use_proxy)
frogr_controller_set_proxy (priv->controller,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]