[frogr] Renamed "session" to "project" when it comes to serialization



commit 0ead3c777bc5fb1fd2939c25d9527995d1cdc8b0
Author: Mario Sanchez Prada <msanchez2 gnome org>
Date:   Thu Nov 8 13:25:05 2012 +0100

    Renamed "session" to "project" when it comes to serialization

 data/gtkbuilder/frogr-main-view.xml |   24 +++++++-------
 src/frogr-controller.c              |    2 +-
 src/frogr-controller.h              |    2 +-
 src/frogr-main-view.c               |   60 +++++++++++++++++-----------------
 4 files changed, 44 insertions(+), 44 deletions(-)
---
diff --git a/data/gtkbuilder/frogr-main-view.xml b/data/gtkbuilder/frogr-main-view.xml
index 1e49786..aa0cee8 100644
--- a/data/gtkbuilder/frogr-main-view.xml
+++ b/data/gtkbuilder/frogr-main-view.xml
@@ -6,18 +6,18 @@
     <property name="stock_id">gtk-about</property>
     <signal name="activate" handler="_on_action_activated" swapped="no"/>
   </object>
-  <object class="GtkAction" id="load_session_action">
-    <property name="label" translatable="yes">_Load Sessionâ</property>
+  <object class="GtkAction" id="load_project_action">
+    <property name="label" translatable="yes">_Load Projectâ</property>
     <property name="stock_id">gtk-open</property>
     <signal name="activate" handler="_on_action_activated" swapped="no"/>
   </object>
-  <object class="GtkAction" id="save_session_action">
-    <property name="label" translatable="yes">_Save Session</property>
+  <object class="GtkAction" id="save_project_action">
+    <property name="label" translatable="yes">_Save Project</property>
     <property name="stock_id">gtk-save</property>
     <signal name="activate" handler="_on_action_activated" swapped="no"/>
   </object>
-  <object class="GtkAction" id="save_session_as_action">
-    <property name="label" translatable="yes">_Save Session Asâ</property>
+  <object class="GtkAction" id="save_project_as_action">
+    <property name="label" translatable="yes">_Save Project Asâ</property>
     <property name="stock_id">gtk-save-as</property>
     <signal name="activate" handler="_on_action_activated" swapped="no"/>
   </object>
@@ -307,28 +307,28 @@
             <property name="visible">True</property>
             <property name="can_focus">False</property>
             <child>
-              <object class="GtkImageMenuItem" id="load_session_menu_item">
+              <object class="GtkImageMenuItem" id="load_project_menu_item">
                 <property name="visible">True</property>
                 <property name="can_focus">False</property>
-                <property name="related_action">load_session_action</property>
+                <property name="related_action">load_project_action</property>
                 <property name="use_underline">True</property>
                 <property name="use_stock">True</property>
               </object>
             </child>
             <child>
-              <object class="GtkImageMenuItem" id="save_session_menu_item">
+              <object class="GtkImageMenuItem" id="save_project_menu_item">
                 <property name="visible">True</property>
                 <property name="can_focus">False</property>
-                <property name="related_action">save_session_action</property>
+                <property name="related_action">save_project_action</property>
                 <property name="use_underline">True</property>
                 <property name="use_stock">True</property>
               </object>
             </child>
             <child>
-              <object class="GtkImageMenuItem" id="save_session_as_menu_item">
+              <object class="GtkImageMenuItem" id="save_project_as_menu_item">
                 <property name="visible">True</property>
                 <property name="can_focus">False</property>
-                <property name="related_action">save_session_as_action</property>
+                <property name="related_action">save_project_as_action</property>
                 <property name="use_underline">True</property>
                 <property name="use_stock">True</property>
               </object>
diff --git a/src/frogr-controller.c b/src/frogr-controller.c
index 6c91cd9..d46a138 100644
--- a/src/frogr-controller.c
+++ b/src/frogr-controller.c
@@ -2725,7 +2725,7 @@ frogr_controller_cancel_ongoing_request (FrogrController *self)
 }
 
 void
-frogr_controller_save_session_to_file (FrogrController *self, const gchar *path)
+frogr_controller_save_project_to_file (FrogrController *self, const gchar *path)
 {
   FrogrControllerPrivate *priv = NULL;
   FrogrMainViewModel *mainview_model = NULL;
diff --git a/src/frogr-controller.h b/src/frogr-controller.h
index 68f2414..52ed3b8 100644
--- a/src/frogr-controller.h
+++ b/src/frogr-controller.h
@@ -123,7 +123,7 @@ void frogr_controller_reorder_pictures (FrogrController *self);
 
 void frogr_controller_cancel_ongoing_request (FrogrController *self);
 
-void frogr_controller_save_session_to_file (FrogrController *self, const gchar *path);
+void frogr_controller_save_project_to_file (FrogrController *self, const gchar *path);
 
 #ifdef GTK_API_VERSION_3
 void frogr_controller_set_use_dark_theme (FrogrController *self, gboolean value);
diff --git a/src/frogr-main-view.c b/src/frogr-main-view.c
index 8ca819a..0a4f183 100644
--- a/src/frogr-main-view.c
+++ b/src/frogr-main-view.c
@@ -96,8 +96,8 @@ typedef struct _FrogrMainViewPrivate {
 
   GtkBuilder *builder;
 
-  GtkAction *save_session_action;
-  GtkAction *save_session_as_action;
+  GtkAction *save_project_action;
+  GtkAction *save_project_as_action;
   GtkAction *load_pictures_action;
   GtkAction *remove_pictures_action;
   GtkAction *upload_pictures_action;
@@ -178,15 +178,15 @@ static GSList *_get_selected_pictures (FrogrMainView *self);
 static gint _n_pictures (FrogrMainView *self);
 static void _open_pictures_in_external_viewer (FrogrMainView *self);
 
-static void _save_current_session (FrogrMainView *self);
+static void _save_current_project (FrogrMainView *self);
 
-static void _save_session_to_file (FrogrMainView *self, const gchar *filepath);
+static void _save_project_to_file (FrogrMainView *self, const gchar *filepath);
 
-static void _save_session_as_dialog_response_cb (GtkDialog *dialog,
+static void _save_project_as_dialog_response_cb (GtkDialog *dialog,
                                                  gint response,
                                                  gpointer data);
 
-static void _save_session_as_dialog (FrogrMainView *self);
+static void _save_project_as_dialog (FrogrMainView *self);
 
 static void _load_pictures_dialog_response_cb (GtkDialog *dialog,
                                               gint response,
@@ -385,15 +385,15 @@ _setup_keyboard_shortcuts (FrogrMainView *self)
   accel = gtk_accel_group_new();
   gtk_window_add_accel_group(priv->window, accel);
 
-  menu_item = GTK_WIDGET (gtk_builder_get_object (priv->builder, "load_session_menu_item"));
+  menu_item = GTK_WIDGET (gtk_builder_get_object (priv->builder, "load_project_menu_item"));
   gtk_widget_add_accelerator(menu_item, "activate", accel, GDK_KEY_o,
                              GDK_PRIMARY_MODIFIER, GTK_ACCEL_VISIBLE);
 
-  menu_item = GTK_WIDGET (gtk_builder_get_object (priv->builder, "save_session_menu_item"));
+  menu_item = GTK_WIDGET (gtk_builder_get_object (priv->builder, "save_project_menu_item"));
   gtk_widget_add_accelerator(menu_item, "activate", accel, GDK_KEY_s,
                              GDK_PRIMARY_MODIFIER, GTK_ACCEL_VISIBLE);
 
-  menu_item = GTK_WIDGET (gtk_builder_get_object (priv->builder, "save_session_as_menu_item"));
+  menu_item = GTK_WIDGET (gtk_builder_get_object (priv->builder, "save_project_as_menu_item"));
   gtk_widget_add_accelerator(menu_item, "activate", accel, GDK_KEY_s,
                              GDK_PRIMARY_MODIFIER | GDK_SHIFT_MASK, GTK_ACCEL_VISIBLE);
 
@@ -558,10 +558,10 @@ _on_action_activated (GtkAction *action, gpointer data)
   FrogrMainViewPrivate *priv = NULL;
 
   priv = FROGR_MAIN_VIEW_GET_PRIVATE (data);
-  if (action == priv->save_session_action)
-    _save_current_session (mainview);
-  else if (action == priv->save_session_as_action)
-    _save_session_as_dialog (mainview);
+  if (action == priv->save_project_action)
+    _save_current_project (mainview);
+  else if (action == priv->save_project_as_action)
+    _save_project_as_dialog (mainview);
   else if (action == priv->load_pictures_action)
     _load_pictures_dialog (mainview);
   else if (action == priv->remove_pictures_action)
@@ -930,32 +930,32 @@ _n_pictures (FrogrMainView *self)
 }
 
 static void
-_save_current_session (FrogrMainView *self)
+_save_current_project (FrogrMainView *self)
 {
   FrogrMainViewPrivate *priv = FROGR_MAIN_VIEW_GET_PRIVATE (self);
 
   if (priv->project_filepath)
-    _save_session_to_file (self, priv->project_filepath);
+    _save_project_to_file (self, priv->project_filepath);
   else
-    _save_session_as_dialog (self);
+    _save_project_as_dialog (self);
 }
 
 static void
-_save_session_to_file (FrogrMainView *self, const gchar *filepath)
+_save_project_to_file (FrogrMainView *self, const gchar *filepath)
 {
   FrogrMainViewPrivate *priv = FROGR_MAIN_VIEW_GET_PRIVATE (self);
   GFile *file = NULL;
 
   /* Add selected pictures to icon view area */
   file = g_file_new_for_path (filepath);
-  frogr_controller_save_session_to_file (priv->controller, filepath);
+  frogr_controller_save_project_to_file (priv->controller, filepath);
   _update_project_path (self, filepath);
 
   g_object_unref (file);
 }
 
 static void
-_save_session_as_dialog_response_cb (GtkDialog *dialog, gint response, gpointer data)
+_save_project_as_dialog_response_cb (GtkDialog *dialog, gint response, gpointer data)
 {
   FrogrMainView *self = FROGR_MAIN_VIEW (data);
 
@@ -965,7 +965,7 @@ _save_session_as_dialog_response_cb (GtkDialog *dialog, gint response, gpointer
 
       filename = gtk_file_chooser_get_filename (GTK_FILE_CHOOSER (dialog));
       if (filename != NULL)
-        _save_session_to_file (self, filename);
+        _save_project_to_file (self, filename);
 
       g_free (filename);
     }
@@ -974,7 +974,7 @@ _save_session_as_dialog_response_cb (GtkDialog *dialog, gint response, gpointer
 }
 
 static void
-_save_session_as_dialog (FrogrMainView *self)
+_save_project_as_dialog (FrogrMainView *self)
 {
   FrogrMainViewPrivate *priv = FROGR_MAIN_VIEW_GET_PRIVATE (self);
   GtkWidget *dialog;
@@ -991,7 +991,7 @@ _save_session_as_dialog (FrogrMainView *self)
   gtk_file_chooser_set_local_only (GTK_FILE_CHOOSER (dialog), TRUE);
 
   g_signal_connect (G_OBJECT (dialog), "response",
-                    G_CALLBACK (_save_session_as_dialog_response_cb), self);
+                    G_CALLBACK (_save_project_as_dialog_response_cb), self);
 
   gtk_window_set_modal (GTK_WINDOW (dialog), TRUE);
   gtk_widget_show_all (dialog);
@@ -1575,8 +1575,8 @@ _update_sensitiveness (FrogrMainView *self)
     {
     case FROGR_STATE_LOADING_PICTURES:
     case FROGR_STATE_UPLOADING_PICTURES:
-      gtk_action_set_sensitive (priv->save_session_action, FALSE);
-      gtk_action_set_sensitive (priv->save_session_as_action, FALSE);
+      gtk_action_set_sensitive (priv->save_project_action, FALSE);
+      gtk_action_set_sensitive (priv->save_project_as_action, FALSE);
       gtk_action_set_sensitive (priv->load_pictures_action, FALSE);
       gtk_action_set_sensitive (priv->remove_pictures_action, FALSE);
       gtk_action_set_sensitive (priv->upload_pictures_action, FALSE);
@@ -1596,8 +1596,8 @@ _update_sensitiveness (FrogrMainView *self)
       has_accounts = (priv->accounts_menu != NULL);
       n_selected_pics = priv->n_selected_pictures;
 
-      gtk_action_set_sensitive (priv->save_session_action, TRUE);
-      gtk_action_set_sensitive (priv->save_session_as_action, TRUE);
+      gtk_action_set_sensitive (priv->save_project_action, TRUE);
+      gtk_action_set_sensitive (priv->save_project_as_action, TRUE);
       gtk_action_set_sensitive (priv->load_pictures_action, TRUE);
       gtk_action_set_sensitive (priv->auth_action, TRUE);
       gtk_widget_set_sensitive (priv->accounts_menu_item, has_accounts);
@@ -1785,10 +1785,10 @@ frogr_main_view_init (FrogrMainView *self)
   priv->status_bar = status_bar;
 
   /* Get actions from GtkBuilder */
-  priv->save_session_action =
-    GTK_ACTION (gtk_builder_get_object (builder, "save_session_action"));
-  priv->save_session_as_action =
-    GTK_ACTION (gtk_builder_get_object (builder, "save_session_as_action"));
+  priv->save_project_action =
+    GTK_ACTION (gtk_builder_get_object (builder, "save_project_action"));
+  priv->save_project_as_action =
+    GTK_ACTION (gtk_builder_get_object (builder, "save_project_as_action"));
   priv->load_pictures_action =
     GTK_ACTION (gtk_builder_get_object (builder, "load_pictures_action"));
   priv->remove_pictures_action =



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