[frogr] Consistenly name the application all around.



commit bf39f7cfa8792709705bd25717b4a99a55e1c409
Author: Mario Sanchez Prada <msanchez igalia com>
Date:   Fri Jan 21 20:30:22 2011 +0100

    Consistenly name the application all around.
    
    Use the long name 'Flickr Remote Organizer' for the main window and
    the short name 'frogr' everywhere else.

 src/Makefile.am         |    1 +
 src/frogr-auth-dialog.c |   11 ++++++-----
 src/frogr-controller.c  |    8 ++++----
 src/frogr-global-defs.h |   32 ++++++++++++++++++++++++++++++++
 src/frogr-main-view.c   |    3 +++
 src/frogr-util.c        |    4 +++-
 src/main.c              |    4 +++-
 7 files changed, 52 insertions(+), 11 deletions(-)
---
diff --git a/src/Makefile.am b/src/Makefile.am
index 130b496..8bf31c1 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -62,6 +62,7 @@ frogr_SOURCES = \
 	frogr-create-new-set-dialog.h \
 	frogr-details-dialog.c \
 	frogr-details-dialog.h \
+	frogr-global-defs.h \
 	frogr-group.c \
 	frogr-group.h \
 	frogr-main-view-model.c \
diff --git a/src/frogr-auth-dialog.c b/src/frogr-auth-dialog.c
index 918bd0b..f03a676 100644
--- a/src/frogr-auth-dialog.c
+++ b/src/frogr-auth-dialog.c
@@ -23,6 +23,7 @@
 #include "frogr-auth-dialog.h"
 
 #include "frogr-controller.h"
+#include "frogr-global-defs.h"
 
 #include <config.h>
 #include <glib/gi18n.h>
@@ -58,10 +59,9 @@ _ask_for_authorization (GtkWindow *parent)
                                    GTK_MESSAGE_INFO,
                                    GTK_BUTTONS_OK,
                                    _(unauth_txt),
-                                   PACKAGE_NAME,
-                                   PACKAGE_NAME);
+                                   APP_SHORTNAME);
 
-  title = g_strdup_printf ("Authorize %s", PACKAGE);
+  title = g_strdup_printf ("Authorize %s", APP_SHORTNAME);
   gtk_window_set_title (GTK_WINDOW (dialog), title);
   g_free (title);
 
@@ -94,8 +94,9 @@ _ask_for_auth_confirmation (GtkWindow *parent)
                                    GTK_MESSAGE_INFO,
                                    GTK_BUTTONS_OK,
                                    _(auth_txt),
-                                   PACKAGE_NAME);
-  title = g_strdup_printf ("Authorize %s", PACKAGE);
+                                   APP_SHORTNAME);
+
+  title = g_strdup_printf ("Authorize %s", APP_SHORTNAME);
   gtk_window_set_title (GTK_WINDOW (dialog), title);
   g_free (title);
 
diff --git a/src/frogr-controller.c b/src/frogr-controller.c
index d49e3f6..741ad20 100644
--- a/src/frogr-controller.c
+++ b/src/frogr-controller.c
@@ -20,7 +20,6 @@
  *
  */
 
-
 #include "frogr-controller.h"
 
 #include "frogr-about-dialog.h"
@@ -32,6 +31,7 @@
 #include "frogr-config.h"
 #include "frogr-create-new-set-dialog.h"
 #include "frogr-details-dialog.h"
+#include "frogr-global-defs.h"
 #include "frogr-main-view.h"
 #include "frogr-picture-loader.h"
 #include "frogr-picture-uploader.h"
@@ -315,7 +315,7 @@ _notify_error_to_user (FrogrController *self, GError *error)
     case FSP_ERROR_NOT_AUTHENTICATED:
       frogr_controller_revoke_authorization (self);
       msg = g_strdup_printf (_("Error\n%s is not properly authorized to upload pictures "
-                               "to flickr.\nPlease re-authorize it"), PACKAGE_NAME);
+                               "to flickr.\nPlease re-authorize it"), APP_SHORTNAME);
       error_function = frogr_util_show_error_dialog;
       break;
 
@@ -352,7 +352,7 @@ _show_auth_failed_dialog (GtkWindow *parent, const gchar *message)
                                    GTK_MESSAGE_ERROR,
                                    GTK_BUTTONS_OK,
                                    "%s", message);
-  gtk_window_set_title (GTK_WINDOW (dialog), PACKAGE);
+  gtk_window_set_title (GTK_WINDOW (dialog), APP_SHORTNAME);
 
   g_signal_connect (G_OBJECT (dialog), "response",
                     G_CALLBACK (_auth_failed_dialog_response_cb),
@@ -2134,7 +2134,7 @@ frogr_controller_upload_pictures (FrogrController *self)
 
       msg = g_strdup_printf (_("You need to properly authorize %s before"
                                " uploading any pictures to flickr.\n"
-                               "Please re-authorize it."), PACKAGE_NAME);
+                               "Please re-authorize it."), APP_SHORTNAME);
 
       window = frogr_main_view_get_window (priv->mainview);
       frogr_util_show_error_dialog (window, msg);
diff --git a/src/frogr-global-defs.h b/src/frogr-global-defs.h
new file mode 100644
index 0000000..ebf7cc4
--- /dev/null
+++ b/src/frogr-global-defs.h
@@ -0,0 +1,32 @@
+/*
+ * frogr-global-defs.h -- Global definitions and constants
+ *
+ * Copyright (C) 2009, 2010, 2011 Mario Sanchez Prada
+ * Authors: Mario Sanchez Prada <msanchez igalia com>
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of version 3 of the GNU General Public
+ * License as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public
+ * License along with this program; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ *
+ */
+
+#ifndef FROGR_GLOBAL_DEFS_H
+#define FROGR_GLOBAL_DEFS_H
+
+#include <config.h>
+
+#define APP_NAME "Flickr Remote Organizer"
+#define APP_SHORTNAME PACKAGE
+#define APP_VERSION VERSION
+
+#endif
diff --git a/src/frogr-main-view.c b/src/frogr-main-view.c
index 694057e..75016f5 100644
--- a/src/frogr-main-view.c
+++ b/src/frogr-main-view.c
@@ -24,6 +24,7 @@
 
 #include "frogr-account.h"
 #include "frogr-controller.h"
+#include "frogr-global-defs.h"
 #include "frogr-main-view-model.h"
 #include "frogr-picture.h"
 #include "frogr-util.h"
@@ -1387,6 +1388,7 @@ frogr_main_view_init (FrogrMainView *self)
   gtk_builder_add_from_file (builder, GTKBUILDER_FILE, NULL);
 
   window = GTK_WINDOW(gtk_builder_get_object (builder, "main_window"));
+  gtk_window_set_title (GTK_WINDOW (window), APP_NAME);
   priv->window = window;
 
   menu_bar = GTK_WIDGET (gtk_builder_get_object (builder, "menu_bar"));
@@ -1428,6 +1430,7 @@ frogr_main_view_init (FrogrMainView *self)
                                                  GTK_STOCK_CANCEL,
                                                  GTK_RESPONSE_CANCEL,
                                                  NULL);
+  gtk_window_set_title (GTK_WINDOW (progress_dialog), APP_SHORTNAME);
 
   gtk_dialog_set_response_sensitive (GTK_DIALOG (progress_dialog),
                                      GTK_RESPONSE_CANCEL, TRUE);
diff --git a/src/frogr-util.c b/src/frogr-util.c
index d3edc08..2cb3dc4 100644
--- a/src/frogr-util.c
+++ b/src/frogr-util.c
@@ -20,6 +20,8 @@
  *
  */
 
+#include "frogr-global-defs.h"
+
 #include <config.h>
 
 #include <glib/gi18n.h>
@@ -57,7 +59,7 @@ frogr_util_show_message_dialog (GtkWindow *parent, const gchar *message, GtkMess
                             type,
                             GTK_BUTTONS_CLOSE,
                             "%s", message);
-  gtk_window_set_title (GTK_WINDOW (dialog), PACKAGE);
+  gtk_window_set_title (GTK_WINDOW (dialog), APP_SHORTNAME);
 
   g_signal_connect (G_OBJECT (dialog), "response",
                     G_CALLBACK (gtk_widget_destroy), dialog);
diff --git a/src/main.c b/src/main.c
index 1ef4203..f0e1466 100644
--- a/src/main.c
+++ b/src/main.c
@@ -22,6 +22,8 @@
 
 #include "frogr-controller.h"
 
+#include "frogr-global-defs.h"
+
 #include <config.h>
 #include <glib/gi18n.h>
 #include <gtk/gtk.h>
@@ -88,7 +90,7 @@ main (int argc, char **argv)
     filepaths = _get_paths_list_from_array (&argv[1], argc - 1);
 
   gtk_init (&argc, &argv);
-  g_set_application_name(PACKAGE);
+  g_set_application_name(APP_SHORTNAME);
 
   /* Translation domain */
   bindtextdomain (GETTEXT_PACKAGE, FROGR_LOCALE_DIR);



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