[glom] Rename Dialog_Image_Progress to DialogImageLoadProgress



commit 029b4ed8f4686b8ee243fca1215704287c9be408
Author: Murray Cumming <murrayc murrayc com>
Date:   Mon Jul 11 14:07:20 2011 +0200

    Rename Dialog_Image_Progress to DialogImageLoadProgress
    
    	* glom/utility_widgets/dialog_image_progress.[h|cc]:
    	Rename to
    	* glom/utility_widgets/dialog_image_load_progress.[h|cc]:
    	* tests/test_glade_derived_instantiation.cc:
    	* ui/operator/dialog_image_progress.glade: Rename to
    	* ui/operator/dialog_image_load_progress.glade:
    	* glom/utility_widgets/imageglom.h:
    	* Makefile.am:
    	* Makefile_glom.am:
    	* po/POTFILES.in: Adapt.
    
    	I can then add a new dialog for saving.

 ChangeLog                                          |   17 +++++++++
 Makefile.am                                        |    2 +-
 Makefile_glom.am                                   |    4 +-
 ...e_progress.cc => dialog_image_load_progress.cc} |   38 ++++++++++----------
 ...age_progress.h => dialog_image_load_progress.h} |   12 +++---
 glom/utility_widgets/imageglom.cc                  |    2 +-
 glom/utility_widgets/imageglom.h                   |    2 +-
 po/POTFILES.in                                     |    4 +-
 tests/test_glade_derived_instantiation.cc          |    4 +-
 ...ress.glade => dialog_image_load_progress.glade} |    0
 10 files changed, 51 insertions(+), 34 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index cc0bb0b..accf6da 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,20 @@
+2011-07-11  Murray Cumming  <murrayc murrayc com>
+
+	Rename Dialog_Image_Progress to DialogImageLoadProgress
+
+	* glom/utility_widgets/dialog_image_progress.[h|cc]:
+	Rename to 
+	* glom/utility_widgets/dialog_image_load_progress.[h|cc]:
+	* tests/test_glade_derived_instantiation.cc:
+	* ui/operator/dialog_image_progress.glade: Rename to
+	* ui/operator/dialog_image_load_progress.glade:
+	* glom/utility_widgets/imageglom.h:
+	* Makefile.am:
+	* Makefile_glom.am:
+	* po/POTFILES.in: Adapt.
+	
+	I can then add a new dialog for saving.
+
 2011-07-11  Ben Konrath  <ben bagu org>
 
 	Add PACKAGE_TARNAME variable to pkg-config file.
diff --git a/Makefile.am b/Makefile.am
index 4d9be69..fd0b555 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -89,7 +89,7 @@ dist_glade_operator_DATA = \
 	ui/operator/dialog_data_invalid_format.glade \
 	ui/operator/dialog_existing_or_new.glade \
 	ui/operator/dialog_find_id.glade \
-	ui/operator/dialog_image_progress.glade \
+	ui/operator/dialog_image_load_progress.glade \
 	ui/operator/dialog_import_csv.glade \
 	ui/operator/dialog_import_csv_progress.glade \
 	ui/operator/window_main.glade \
diff --git a/Makefile_glom.am b/Makefile_glom.am
index aa48114..56c3748 100644
--- a/Makefile_glom.am
+++ b/Makefile_glom.am
@@ -188,8 +188,8 @@ glom_source_files = \
 	glom/utility_widgets/combo_textglade.h				\
 	glom/utility_widgets/dialog_flowtable.cc			\
 	glom/utility_widgets/dialog_flowtable.h				\
-	glom/utility_widgets/dialog_image_progress.cc			\
-	glom/utility_widgets/dialog_image_progress.h			\
+	glom/utility_widgets/dialog_image_load_progress.cc			\
+	glom/utility_widgets/dialog_image_load_progress.h			\
 	glom/utility_widgets/dialog_properties.cc			\
 	glom/utility_widgets/dialog_properties.h			\
 	glom/utility_widgets/flowtable.cc				\
diff --git a/glom/utility_widgets/dialog_image_progress.cc b/glom/utility_widgets/dialog_image_load_progress.cc
similarity index 75%
rename from glom/utility_widgets/dialog_image_progress.cc
rename to glom/utility_widgets/dialog_image_load_progress.cc
index 167b3e7..f681f5c 100644
--- a/glom/utility_widgets/dialog_image_progress.cc
+++ b/glom/utility_widgets/dialog_image_load_progress.cc
@@ -18,7 +18,7 @@
  * Boston, MA 02111-1307, USA.
  */
 
-#include "dialog_image_progress.h"
+#include "dialog_image_load_progress.h"
 
 #include <gtkmm/messagedialog.h>
 #include <glibmm/i18n.h>
@@ -34,19 +34,19 @@ const unsigned int CHUNK_SIZE = 2048;
 namespace Glom
 {
 
-const char* Dialog_Image_Progress::glade_id("dialog_image_progress");
-const bool Dialog_Image_Progress::glade_developer(false);
+const char* DialogImageLoadProgress::glade_id("dialog_image_load_progress");
+const bool DialogImageLoadProgress::glade_developer(false);
 
-Dialog_Image_Progress::Dialog_Image_Progress(BaseObjectType* cobject, const Glib::RefPtr<Gtk::Builder>& builder)
+DialogImageLoadProgress::DialogImageLoadProgress(BaseObjectType* cobject, const Glib::RefPtr<Gtk::Builder>& builder)
 : Gtk::Dialog(cobject)
 {
   builder->get_widget("image_loading_progress_bar", m_progress_bar);
 
   if(!m_progress_bar)
-    throw std::runtime_error("Missing widgets from glade file for Dialog_Image_Progress");
+    throw std::runtime_error("Missing widgets from glade file for DialogImageLoadProgress");
 }
 
-Dialog_Image_Progress::~Dialog_Image_Progress()
+DialogImageLoadProgress::~DialogImageLoadProgress()
 {
   if(m_data.get())
     g_free(m_data->data);
@@ -67,7 +67,7 @@ Dialog_Image_Progress::~Dialog_Image_Progress()
   // TODO: Cancel outstanding async operations in destructor?
 }
 
-void Dialog_Image_Progress::load(const Glib::ustring& uri)
+void DialogImageLoadProgress::load(const Glib::ustring& uri)
 {
   // Can only load one file with data 
   g_assert(!m_data.get());
@@ -83,7 +83,7 @@ void Dialog_Image_Progress::load(const Glib::ustring& uri)
   try
   {
     // Open the file for reading:
-    m_file->read_async(sigc::mem_fun(*this, &Dialog_Image_Progress::on_file_read));
+    m_file->read_async(sigc::mem_fun(*this, &DialogImageLoadProgress::on_file_read));
   }
   catch(const Glib::Error& ex)
   {
@@ -91,13 +91,13 @@ void Dialog_Image_Progress::load(const Glib::ustring& uri)
   }
 }
 
-void Dialog_Image_Progress::on_file_read(const Glib::RefPtr<Gio::AsyncResult>& result)
+void DialogImageLoadProgress::on_file_read(const Glib::RefPtr<Gio::AsyncResult>& result)
 {
   try
   {
     m_stream = m_file->read_finish(result);
     // Query size of the file, so that we can show progress:
-    m_stream->query_info_async(sigc::mem_fun(*this, &Dialog_Image_Progress::on_query_info), G_FILE_ATTRIBUTE_STANDARD_SIZE);
+    m_stream->query_info_async(sigc::mem_fun(*this, &DialogImageLoadProgress::on_query_info), G_FILE_ATTRIBUTE_STANDARD_SIZE);
   }
   catch(const Glib::Error& ex)
   {
@@ -105,7 +105,7 @@ void Dialog_Image_Progress::on_file_read(const Glib::RefPtr<Gio::AsyncResult>& r
   }
 }
 
-void Dialog_Image_Progress::on_query_info(const Glib::RefPtr<Gio::AsyncResult>& result)
+void DialogImageLoadProgress::on_query_info(const Glib::RefPtr<Gio::AsyncResult>& result)
 {
   try
   {
@@ -117,7 +117,7 @@ void Dialog_Image_Progress::on_query_info(const Glib::RefPtr<Gio::AsyncResult>&
       error(_("Not enough memory available to load the image"));
 
     // Read the first chunk from the file
-    m_stream->read_async(m_data->data, std::min<gsize>(CHUNK_SIZE, m_data->binary_length), sigc::bind(sigc::mem_fun(*this, &Dialog_Image_Progress::on_stream_read), 0));
+    m_stream->read_async(m_data->data, std::min<gsize>(CHUNK_SIZE, m_data->binary_length), sigc::bind(sigc::mem_fun(*this, &DialogImageLoadProgress::on_stream_read), 0));
   }
   catch(const Glib::Error& ex)
   {
@@ -125,7 +125,7 @@ void Dialog_Image_Progress::on_query_info(const Glib::RefPtr<Gio::AsyncResult>&
   }
 }
 
-void Dialog_Image_Progress::on_stream_read(const Glib::RefPtr<Gio::AsyncResult>& result, unsigned int offset)
+void DialogImageLoadProgress::on_stream_read(const Glib::RefPtr<Gio::AsyncResult>& result, unsigned int offset)
 {
   try
   {
@@ -142,7 +142,7 @@ void Dialog_Image_Progress::on_stream_read(const Glib::RefPtr<Gio::AsyncResult>&
       // Even if choose a priority lower than GDK_PRIORITY_REDRAW + 10 for the
       // read_async we don't see the progressbar progressing while the image
       // is loading. Therefore we put an idle inbetween.
-      Glib::signal_idle().connect(sigc::bind_return(sigc::bind(sigc::mem_fun(*this, &Dialog_Image_Progress::on_read_next), offset + size), false));
+      Glib::signal_idle().connect(sigc::bind_return(sigc::bind(sigc::mem_fun(*this, &DialogImageLoadProgress::on_read_next), offset + size), false));
     else
       // We are done loading the image, close the progress dialog
       response(Gtk::RESPONSE_ACCEPT);
@@ -153,14 +153,14 @@ void Dialog_Image_Progress::on_stream_read(const Glib::RefPtr<Gio::AsyncResult>&
   }
 }
 
-void Dialog_Image_Progress::on_read_next(unsigned int at)
+void DialogImageLoadProgress::on_read_next(unsigned int at)
 {
   g_assert(at < static_cast<gsize>(m_data->binary_length));
 
-  m_stream->read_async(m_data->data + at, std::min<gsize>(CHUNK_SIZE, m_data->binary_length - at), sigc::bind(sigc::mem_fun(*this, &Dialog_Image_Progress::on_stream_read), at));
+  m_stream->read_async(m_data->data + at, std::min<gsize>(CHUNK_SIZE, m_data->binary_length - at), sigc::bind(sigc::mem_fun(*this, &DialogImageLoadProgress::on_stream_read), at));
 }
 
-void Dialog_Image_Progress::error(const Glib::ustring& error_message)
+void DialogImageLoadProgress::error(const Glib::ustring& error_message)
 {
   Gtk::MessageDialog dialog(*this, Glib::ustring::compose(_("Error loading %1"), m_file->get_parse_name()), Gtk::MESSAGE_ERROR);
   dialog.set_title(_("Error loading image"));
@@ -170,12 +170,12 @@ void Dialog_Image_Progress::error(const Glib::ustring& error_message)
   response(Gtk::RESPONSE_REJECT);
 }
 
-std::auto_ptr<GdaBinary> Dialog_Image_Progress::get_image_data()
+std::auto_ptr<GdaBinary> DialogImageLoadProgress::get_image_data()
 {
   return m_data;
 }
 
-Glib::RefPtr<Gdk::Pixbuf> Dialog_Image_Progress::get_pixbuf() 
+Glib::RefPtr<Gdk::Pixbuf> DialogImageLoadProgress::get_pixbuf() 
 {
   return m_loader->get_pixbuf();
 }
diff --git a/glom/utility_widgets/dialog_image_progress.h b/glom/utility_widgets/dialog_image_load_progress.h
similarity index 83%
rename from glom/utility_widgets/dialog_image_progress.h
rename to glom/utility_widgets/dialog_image_load_progress.h
index 3bcbcfc..3c9f89d 100644
--- a/glom/utility_widgets/dialog_image_progress.h
+++ b/glom/utility_widgets/dialog_image_load_progress.h
@@ -18,8 +18,8 @@
  * Boston, MA 02111-1307, USA.
  */
 
-#ifndef GLOM_UTILITY_WIDGETS_DIALOG_IMAGE_PROGRESS_H
-#define GLOM_UTILITY_WIDGETS_DIALOG_IMAGE_PROGRESS_H
+#ifndef GLOM_UTILITY_WIDGETS_DIALOG_IMAGE_LOAD_PROGRESS_H
+#define GLOM_UTILITY_WIDGETS_DIALOG_IMAGE_LOAD_PROGRESS_H
 
 #include <gtkmm/dialog.h>
 #include <gtkmm/builder.h>
@@ -33,14 +33,14 @@
 namespace Glom
 {
 
-class Dialog_Image_Progress : public Gtk::Dialog
+class DialogImageLoadProgress : public Gtk::Dialog
 {
 public:
   static const char* glade_id;
   static const bool glade_developer;
 
-  Dialog_Image_Progress(BaseObjectType* cobject, const Glib::RefPtr<Gtk::Builder>& builder);
-  virtual ~Dialog_Image_Progress();
+  DialogImageLoadProgress(BaseObjectType* cobject, const Glib::RefPtr<Gtk::Builder>& builder);
+  virtual ~DialogImageLoadProgress();
 
   void load(const Glib::ustring& uri);
 
@@ -66,4 +66,4 @@ private:
 
 } //namespace Glom
 
-#endif // GLOM_UTILITY_WIDGETS_DIALOG_IMAGE_PROGRESS_H
+#endif // GLOM_UTILITY_WIDGETS_DIALOG_IMAGE_LOAD_PROGRESS_H
diff --git a/glom/utility_widgets/imageglom.cc b/glom/utility_widgets/imageglom.cc
index 3cc4d09..6bfc48b 100644
--- a/glom/utility_widgets/imageglom.cc
+++ b/glom/utility_widgets/imageglom.cc
@@ -334,7 +334,7 @@ void ImageGlom::on_menupopup_activate_select_file()
     const Glib::ustring uri = dialog.get_uri();
     if(!uri.empty())
     {
-      Dialog_Image_Progress* dialog;
+      DialogImageLoadProgress* dialog;
       Utils::get_glade_widget_derived_with_warning(dialog);
       if(dialog)
       {
diff --git a/glom/utility_widgets/imageglom.h b/glom/utility_widgets/imageglom.h
index 5dae71d..f6b6cb6 100644
--- a/glom/utility_widgets/imageglom.h
+++ b/glom/utility_widgets/imageglom.h
@@ -24,7 +24,7 @@
 #include <gtkmm.h>
 #include <libglom/data_structure/field.h>
 #include "layoutwidgetfield.h"
-#include "dialog_image_progress.h"
+#include "dialog_image_load_progress.h"
 #include <gtkmm/builder.h>
 
 namespace Glom
diff --git a/po/POTFILES.in b/po/POTFILES.in
index c368b04..46ff304 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -120,7 +120,7 @@ glom/mode_data/datawidget/combochoiceswithtreemodel.cc
 glom/mode_data/datawidget/datawidget.cc
 glom/mode_data/db_adddel/db_adddel.cc
 glom/mode_data/datawidget/dialog_choose_id.cc
-glom/utility_widgets/dialog_image_progress.cc
+glom/utility_widgets/dialog_image_load_progress.cc
 glom/mode_data/datawidget/entry.cc
 glom/utility_widgets/eggspreadtable/eggspreadtable.c
 glom/utility_widgets/filechooserdialog_saveextras.cc
@@ -138,7 +138,7 @@ ui/operator/dialog_connection.glade
 ui/operator/dialog_data_invalid_format.glade
 ui/operator/dialog_existing_or_new.glade
 ui/operator/dialog_find_id.glade
-ui/operator/dialog_image_progress.glade
+ui/operator/dialog_image_load_progress.glade
 ui/operator/dialog_import_csv.glade
 ui/operator/dialog_import_csv_progress.glade
 ui/operator/window_main.glade
diff --git a/tests/test_glade_derived_instantiation.cc b/tests/test_glade_derived_instantiation.cc
index 5b74bb9..f685336 100644
--- a/tests/test_glade_derived_instantiation.cc
+++ b/tests/test_glade_derived_instantiation.cc
@@ -14,7 +14,7 @@
 #include <glom/mode_data/datawidget/dialog_choose_date.h>
 #include <glom/mode_data/datawidget/dialog_choose_id.h>
 #include <glom/utility_widgets/dialog_flowtable.h>
-#include <glom/utility_widgets/dialog_image_progress.h>
+#include <glom/utility_widgets/dialog_image_load_progress.h>
 #include <glom/mode_design/layout/dialog_choose_field.h>
 #include <glom/mode_design/dialog_add_related_table.h>
 #include <glom/mode_design/layout/layout_item_dialogs/dialog_buttonscript.h>
@@ -87,7 +87,7 @@ int main(int argc, char *argv[])
   instantiate_widget<DataWidgetChildren::Dialog_ChooseID>();
   instantiate_widget<DataWidgetChildren::Dialog_ChooseDate>();
   instantiate_widget<Dialog_InvalidData>();
-  instantiate_widget<Dialog_Image_Progress>();
+  instantiate_widget<DialogImageLoadProgress>();
   instantiate_widget<Dialog_ProgressCreating>();
 
   //Developer mode UI:
diff --git a/ui/operator/dialog_image_progress.glade b/ui/operator/dialog_image_load_progress.glade
similarity index 100%
rename from ui/operator/dialog_image_progress.glade
rename to ui/operator/dialog_image_load_progress.glade



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