[glom] Avoid use of deprecated cairomm API.



commit fb3c5bbf6453337a5d86784168d2349fb7d44164
Author: Murray Cumming <murrayc murrayc com>
Date:   Thu Sep 2 16:20:08 2010 +0200

    Avoid use of deprecated cairomm API.
    
    * configure.ac: Also check for CAIROMM deprecations.
    * glom/import_csv/dialog_import_csv.cc: Fix a bad git merge.

 ChangeLog                            |    7 +++++++
 configure.ac                         |    2 +-
 glom/import_csv/dialog_import_csv.cc |   14 +++-----------
 glom/utility_widgets/flowtable.h     |   32 ++++++++++++++++----------------
 4 files changed, 27 insertions(+), 28 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 5daaa7e..277cfdc 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2010-09-02  Murray Cumming  <murrayc murrayc com>
+
+	Avoid use of deprecated cairomm API.
+
+	* configure.ac: Also check for CAIROMM deprecations.
+	* glom/import_csv/dialog_import_csv.cc: Fix a bad git merge.
+
 2010-08-19  David King  <davidk openismus com>
 
 	Include the correct config.h
diff --git a/configure.ac b/configure.ac
index c195ade..69b646f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -194,7 +194,7 @@ MM_ARG_ENABLE_WARNINGS([GLOM_WFLAGS],
 MM_ARG_ENABLE_WARNINGS([GLOM_WXXFLAGS],
                        [-Wall],
                        [-Wall -Wextra -Wno-missing-field-initializers -DGSEAL_ENABLE],
-                       [G GDK GDK_PIXBUF GTK GLIBMM GTKMM])
+                       [G GDK GDK_PIXBUF GTK GLIBMM GTKMM CAIROMM])
 
 AC_CHECK_FUNCS([strptime])
 
diff --git a/glom/import_csv/dialog_import_csv.cc b/glom/import_csv/dialog_import_csv.cc
index 2ec84be..8862e37 100644
--- a/glom/import_csv/dialog_import_csv.cc
+++ b/glom/import_csv/dialog_import_csv.cc
@@ -735,18 +735,10 @@ void Dialog_Import_CSV::on_parser_file_read_error(const Glib::ustring& error_mes
   catch(const Glib::ConvertError& ex)
   {
     std::cerr << "Glib::filename_from_uri() failed: " << ex.what() << std::endl;
-  }
-<<<<<<< HEAD:glom/import_csv/dialog_import_csv.cc
-
-=======
-#else
-  std::auto_ptr<Glib::Error> error;
-  filename = Glib::filename_from_uri(m_file_uri, error);
-#endif
 
->>>>>>> 39fc4d7... SpinButtons: Don't have 0 to 0 ranges with only 0 increments possible.:glom/import_csv/dialog_import_csv.cc
-  show_error_dialog(_("Could Not Open file"),
-    Glib::ustring::compose(_("The file at \"%1\" could not be opened: %2"), filename, error_message) );
+    show_error_dialog(_("Could Not Open file"),
+      Glib::ustring::compose(_("The file at \"%1\" could not be opened: %2"), filename, error_message) );
+  }
 }
 
 void Dialog_Import_CSV::on_parser_have_display_name(const Glib::ustring& display_name)
diff --git a/glom/utility_widgets/flowtable.h b/glom/utility_widgets/flowtable.h
index fd5fb1c..a20013a 100644
--- a/glom/utility_widgets/flowtable.h
+++ b/glom/utility_widgets/flowtable.h
@@ -29,7 +29,7 @@ namespace Glom
 
 class FlowTable : public Gtk::Container
 {
-public: 
+public:
   FlowTable();
   virtual ~FlowTable();
 
@@ -43,21 +43,21 @@ public:
   virtual void remove(Gtk::Widget& first); //override
 
   void set_columns_count(guint value);
-  
+
   guint get_columns_count() const;
 
   /** Sets the padding to put between the columns of widgets.
    */
   void set_column_padding(guint padding);
-  
+
   /** Gets the padding between the columns of widgets.
    */
   guint get_column_padding() const;
-  
+
   /** Sets the padding to put between the rows of widgets.
    */
   void set_row_padding(guint padding);
-  
+
   /** Gets the padding between the rows of widgets.
    */
   guint get_row_padding() const;
@@ -71,9 +71,9 @@ public:
   // Implement forall which is not implemented in gtkmm:
   typedef sigc::slot<void, Widget&> ForallSlot;
   void forall(const ForallSlot& slot);
-  
+
   /** Get the column in which the specified "first" widget is placed.
-   * result false if the widget is not one of the "first" widgets, or 
+   * result false if the widget is not one of the "first" widgets, or
    * if has not yet been placed in a column, because the size has not yet been requested.
    */
   bool get_column_for_first_widget(const Gtk::Widget& first, guint& column);
@@ -93,16 +93,16 @@ private:
 protected:
 
   virtual void on_size_allocate(Gtk::Allocation& allocation);
-  
+
   //Do extra drawing:
   //Virtual method overrides:
   void on_realize();
   void on_unrealize();
   bool on_expose_event(GdkEventExpose* event);
-  
+
   int get_column_height(guint start_widget, guint widget_count, int& total_width) const;
 
-  /** 
+  /**
    * @result The height when the children are arranged optimally (so that the height is minimum).
    */
   int get_minimum_column_height(guint start_widget, guint columns_count, int& total_width) const;
@@ -117,16 +117,16 @@ protected:
     Gtk::Widget* m_second;
     bool m_expand_first_full;
     bool m_expand_second;
-    
+
     //The column that the widgets are currently in, due to the size/allocation.
     bool m_has_allocated_column;
     guint m_allocated_column;
-    
+
     bool operator==(Gtk::Widget* child) const
     {
       return (child == m_first || child == m_second);
     }
-    
+
     //Cache the positions, so we can use them in on_expose_event:
     Gtk::Allocation m_first_allocation;
     Gtk::Allocation m_second_allocation;
@@ -138,7 +138,7 @@ private:
   int get_item_requested_height(const FlowTableItem& item) const;
   void get_item_requested_width(const FlowTableItem& item, int& first, int& second) const;
   void get_item_max_width_requested(guint start, guint height, guint& first_max_width, guint& second_max_width, guint& singles_max_width, bool& is_last_column) const; //TODO: maybe combine this with code in get_minimum_column_height().
-  
+
   bool child_is_visible(const Gtk::Widget* widget) const;
 
   Gtk::Allocation assign_child(Gtk::Widget* widget, int x, int y);
@@ -147,10 +147,10 @@ private:
 protected:
   typedef std::vector<FlowTableItem> type_vecChildren;
   type_vecChildren m_children;
-  
+
   //Reset this and check it later to see if the layout of items has changed.
   bool m_columns_allocated_changed;
-  
+
 private:
   guint m_columns_count;
   guint m_column_padding, m_row_padding;



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