[niepce] Issue #30 - ui: Use the word Catalog instead of Library



commit ff7b05ddf34cefc9b6b3a3f8081c74a62e83db12
Author: Hubert Figuière <hub figuiere net>
Date:   Sat Oct 13 07:36:30 2018 -0400

    Issue #30 - ui: Use the word Catalog instead of Library
    
    - This also change the configuration keys related to that.
    
    https://gitlab.gnome.org/GNOME/niepce/issues/30

 doc/gconf.txt                               |  4 ++--
 src/fwk/toolkit/application.cpp             |  2 +-
 src/niepce/ui/dialogs/preferences.ui        |  7 +++++--
 src/niepce/ui/dialogs/preferencesdialog.cpp |  4 ++--
 src/niepce/ui/moduleshell.cpp               |  2 +-
 src/niepce/ui/niepcewindow.cpp              | 14 +++++++-------
 6 files changed, 18 insertions(+), 15 deletions(-)
---
diff --git a/doc/gconf.txt b/doc/gconf.txt
index 59136d6..0329d1a 100644
--- a/doc/gconf.txt
+++ b/doc/gconf.txt
@@ -4,8 +4,8 @@ gconf keys
 /app/niepce
       ui_theme_file = the UI rc file to load. Empty means use the system one.
       ui_theme_set = 0, use system theme. 1, use the dark theme.
-      reopen_last_library = 1 or 0 to reopen the last library
-      lastOpenLibrary = the last open library to reopen (a directory)
+      reopen_last_catalog = 1 or 0 to reopen the last library
+      last_open_catalog = the last open catalog to reopen (a directory)
 
 Things to move to the library conf file.
       last_import_location
diff --git a/src/fwk/toolkit/application.cpp b/src/fwk/toolkit/application.cpp
index ba912a6..9a52f1d 100644
--- a/src/fwk/toolkit/application.cpp
+++ b/src/fwk/toolkit/application.cpp
@@ -117,7 +117,7 @@ void Application::on_startup()
 
 void Application::init_actions()
 {
-    fwk::add_action(m_gtkapp, "OpenLibrary",
+    fwk::add_action(m_gtkapp, "OpenCatalog",
                     sigc::mem_fun(*this,
                                   &Application::on_action_file_open),
                     "app", "<Primary>o");
diff --git a/src/niepce/ui/dialogs/preferences.ui b/src/niepce/ui/dialogs/preferences.ui
index 88c092a..744768b 100644
--- a/src/niepce/ui/dialogs/preferences.ui
+++ b/src/niepce/ui/dialogs/preferences.ui
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<!-- Generated with glade 3.20.0 -->
+<!-- Generated with glade 3.22.1 -->
 <interface>
   <requires lib="gtk+" version="3.20"/>
   <object class="GtkDialog" id="preferences">
@@ -11,6 +11,9 @@
     <property name="default_width">400</property>
     <property name="default_height">300</property>
     <property name="type_hint">dialog</property>
+    <child>
+      <placeholder/>
+    </child>
     <child internal-child="vbox">
       <object class="GtkBox" id="dialog-vbox1">
         <property name="visible">True</property>
@@ -64,7 +67,7 @@
                 <property name="border_width">12</property>
                 <child>
                   <object class="GtkCheckButton" id="reopen_checkbutton">
-                    <property name="label" translatable="yes">_Reopen Library</property>
+                    <property name="label" translatable="yes">_Reopen Catalog</property>
                     <property name="visible">True</property>
                     <property name="can_focus">True</property>
                     <property name="receives_default">False</property>
diff --git a/src/niepce/ui/dialogs/preferencesdialog.cpp b/src/niepce/ui/dialogs/preferencesdialog.cpp
index 2bb1cf3..3e22c56 100644
--- a/src/niepce/ui/dialogs/preferencesdialog.cpp
+++ b/src/niepce/ui/dialogs/preferencesdialog.cpp
@@ -1,7 +1,7 @@
 /*
  * niepce - ui/dialogs/preferencesdialog.cpp
  *
- * Copyright (C) 2009-2013 Hubert Figuiere
+ * Copyright (C) 2009-2018 Hubert Figuiere
  *
  * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -63,7 +63,7 @@ void PreferencesDialog::setup_widget()
     binder_pool->add_binder(new fwk::ConfigDataBinder<bool>(
                                    reopen_checkbutton->property_active(),
                                    fwk::Application::app()->config(),
-                                   "reopen_last_library"));
+                                   "reopen_last_catalog"));
     builder()->get_widget("write_xmp_checkbutton", write_xmp_checkbutton);
     binder_pool->add_binder(new fwk::ConfigDataBinder<bool>(
                                  write_xmp_checkbutton->property_active(),
diff --git a/src/niepce/ui/moduleshell.cpp b/src/niepce/ui/moduleshell.cpp
index 3e0f832..86b7e1e 100644
--- a/src/niepce/ui/moduleshell.cpp
+++ b/src/niepce/ui/moduleshell.cpp
@@ -196,7 +196,7 @@ Gtk::Widget * ModuleShell::buildWidget()
 
     m_gridview = GridViewModule::Ptr(
         new GridViewModule(*this, m_selection_controller->get_list_store()));
-    add_library_module(m_gridview, "grid", _("Library"));
+    add_library_module(m_gridview, "grid", _("Catalog"));
 
     m_selection_controller->add_selectable(m_gridview);
     m_selection_controller->signal_selected
diff --git a/src/niepce/ui/niepcewindow.cpp b/src/niepce/ui/niepcewindow.cpp
index 9654898..9a4f662 100644
--- a/src/niepce/ui/niepcewindow.cpp
+++ b/src/niepce/ui/niepcewindow.cpp
@@ -236,8 +236,8 @@ void NiepceWindow::init_actions()
     // Main "hamburger" menu
     section = Gio::Menu::create();
     m_main_menu->append_section(section);
-    section->append(_("New Library..."), "app.NewLibrary");
-    section->append(_("Open Library..."), "app.OpenLibrary");
+    section->append(_("New Catalog..."), "app.NewCatalog");
+    section->append(_("Open Catalog..."), "app.OpenCatalog");
 
     section = Gio::Menu::create();
     m_main_menu->append_section(section);
@@ -263,13 +263,13 @@ void NiepceWindow::on_open_library()
     std::string libMoniker;
     int reopen = 0;
     try {
-        reopen = std::stoi(cfg.getValue("reopen_last_library", "0"));
+        reopen = std::stoi(cfg.getValue("reopen_last_catalog", "0"));
     }
     catch(...)
     {
     }
     if(reopen) {
-        libMoniker = cfg.getValue("lastOpenLibrary", "");
+        libMoniker = cfg.getValue("last_open_catalog", "");
     }
     if(libMoniker.empty()) {
         libMoniker = prompt_open_library();
@@ -342,7 +342,7 @@ void NiepceWindow::on_lib_notification(const eng::LibNotification& ln)
 std::string NiepceWindow::prompt_open_library()
 {
     std::string libMoniker;
-    Gtk::FileChooserDialog dialog(gtkWindow(), _("Open library"),
+    Gtk::FileChooserDialog dialog(gtkWindow(), _("Open catalog"),
                                   Gtk::FILE_CHOOSER_ACTION_SELECT_FOLDER);
     dialog.add_button(_("Cancel"), Gtk::RESPONSE_CANCEL);
     dialog.add_button(_("Open"), Gtk::RESPONSE_OK);
@@ -357,8 +357,8 @@ std::string NiepceWindow::prompt_open_library()
         // pass it to the library
         libMoniker = "local:";
         libMoniker += libraryToCreate.c_str();
-        cfg.setValue("lastOpenLibrary", libMoniker);
-        DBG_OUT("created library %s", libMoniker.c_str());
+        cfg.setValue("last_open_catalog", libMoniker);
+        DBG_OUT("created catalog %s", libMoniker.c_str());
         break;
     }
     default:


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