[glom/gtktoolpallete] Use GtkToolPalette instead of EggToolPalette.



commit 69f150bc60a99baa83fc5629c69245aac64678bd
Author: Murray Cumming <murrayc murrayc com>
Date:   Thu Dec 17 13:05:00 2009 +0100

    Use GtkToolPalette instead of EggToolPalette.
    
    * Makefile_libegg.am:
    * glom/utility_widgets/egg/: Removed.
    * Other files: Use GtkToolPalette instead of EggToolPalette.
    Seems to work.

 ChangeLog                                          |    9 +
 Makefile.am                                        |   10 +-
 Makefile_libegg.am                                 |   56 -
 .../print_layouts/print_layout_toolbar.cc          |   14 +-
 .../print_layouts/print_layout_toolbar_button.cc   |    6 +-
 .../print_layouts/window_print_layout_edit.cc      |    2 +-
 glom/utility_widgets/egg/toolpalette/.gitignore    |    1 -
 glom/utility_widgets/egg/toolpalette/TODO          |   32 -
 .../egg/toolpalette/eggenumaction.c                |  552 -----
 .../egg/toolpalette/eggenumaction.h                |   76 -
 .../egg/toolpalette/eggtoolitemgroup.c             | 2191 --------------------
 .../egg/toolpalette/eggtoolitemgroup.h             |   89 -
 .../egg/toolpalette/eggtoolpalette.c               | 1638 ---------------
 .../egg/toolpalette/eggtoolpalette.h               |  133 --
 .../egg/toolpalette/eggtoolpaletteprivate.h        |   61 -
 .../egg/toolpalette/testtoolpalette.c              |  912 --------
 glom/utility_widgets/egg/util/.gitignore           |    2 -
 glom/utility_widgets/egg/util/egg-macros.h         |  154 --
 glom/utility_widgets/egg/util/egg-marshal.c        |    2 -
 glom/utility_widgets/egg/util/eggintl.h            |    8 -
 glom/utility_widgets/egg/util/eggmarshalers.list   |   20 -
 glom/utility_widgets/flowtable_dnd.cc              |   10 +-
 glom/utility_widgets/layouttoolbar.cc              |   10 +-
 glom/utility_widgets/sidebar.cc                    |   10 +-
 glom/utility_widgets/sidebar.h                     |   10 +-
 25 files changed, 41 insertions(+), 5967 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 731c43b..c9111e0 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2009-12-17  Murray Cumming  <murrayc murrayc com>
+
+	Use GtkToolPalette instead of EggToolPalette.
+
+	* Makefile_libegg.am:
+	* glom/utility_widgets/egg/: Removed.
+	* Other files: Use GtkToolPalette instead of EggToolPalette. 
+	Seems to work.
+
 2009-12-14  Murray Cumming  <murrayc murrayc com>
 
 	* glom.desktop.in.in: Remove the Application category because 
diff --git a/Makefile.am b/Makefile.am
index 21deb26..7e8d5e0 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -53,11 +53,6 @@ bin_PROGRAMS = glom/glom
 lib_LTLIBRARIES = glom/libglom/libglom-1.12.la
 pyexec_LTLIBRARIES = glom/python_embed/python_module/glom_1_12.la
 
-noinst_LIBRARIES =						\
-	glom/utility_widgets/egg/toolpalette/libeggtoolpalette.a\
-	glom/utility_widgets/egg/util/libeggutil.a
-
-include Makefile_libegg.am
 include Makefile_libglom.am
 include Makefile_glom.am
 include Makefile_tests.am
@@ -150,8 +145,7 @@ mimedir = $(datadir)/mime
 mimepackagesdir = $(mimedir)/packages
 dist_mimepackages_DATA = glom.xml
 
-dist_template = glom/glom.rc glom/utility_widgets/egg/util/eggmarshalers.list \
-                glom.service.in
+dist_template = glom/glom.rc glom.service.in
 dist_docutils = gnome-doc-utils.make omf.make xmldocs.make
 dist_intltool = intltool-extract.in intltool-merge.in intltool-update.in
 dist_docfiles = docs/overview.txt docs/developer_documentation.txt \
@@ -167,8 +161,6 @@ CLEANFILES = $(dbusservice_DATA) $(desktop_DATA) $(win_resfile)
 DISTCLEANFILES = intltool-extract intltool-merge intltool-update
 MAINTAINERCLEANFILES = \
 	$(dist_docutils) $(dist_intltool) \
-	glom/utility_widgets/egg/util/eggmarshalers.c \
-	glom/utility_widgets/egg/util/eggmarshalers.h \
 	macros/gnome-doc-utils.m4 macros/intltool.m4 \
 	macros/libtool.m4 macros/ltoptions.m4 macros/ltsugar.m4 \
 	macros/ltversion.m4 macros/lt~obsolete.m4
diff --git a/glom/mode_design/print_layouts/print_layout_toolbar.cc b/glom/mode_design/print_layouts/print_layout_toolbar.cc
index a4a8201..061f0a7 100644
--- a/glom/mode_design/print_layouts/print_layout_toolbar.cc
+++ b/glom/mode_design/print_layouts/print_layout_toolbar.cc
@@ -25,7 +25,7 @@
 #include <libglom/libglom_config.h>
 
 //#include "layoutwidgetbase.h"
-#include <glom/utility_widgets/egg/toolpalette/eggtoolitemgroup.h>
+#include <gtk/gtktoolitemgroup.h>
 
 namespace Glom
 {
@@ -57,23 +57,23 @@ PrintLayoutToolbar::PrintLayoutToolbar()
                                         _("Related Records"), _("Drag this to the layout to add a new related records portal.")));
   
   //Note for translators: These are layout items, like widgets in GTK+.
-  GtkContainer* items_group = GTK_CONTAINER(egg_tool_item_group_new(_("Items")));
+  GtkContainer* items_group = GTK_CONTAINER(gtk_tool_item_group_new(_("Items")));
   gtk_container_add(items_group, GTK_WIDGET(drag_field->gobj()));
   gtk_container_add(items_group, GTK_WIDGET(drag_text->gobj()));
   gtk_container_add(items_group, GTK_WIDGET(drag_image->gobj()));
 
   //Note for translators: These are layout items, like widgets in GTK+.
-  GtkContainer* lines_group = GTK_CONTAINER(egg_tool_item_group_new(_("Lines")));
+  GtkContainer* lines_group = GTK_CONTAINER(gtk_tool_item_group_new(_("Lines")));
   gtk_container_add(lines_group, GTK_WIDGET(drag_line_horizontal->gobj()));
   gtk_container_add(lines_group, GTK_WIDGET(drag_line_vertical->gobj()));
   
   //Note for translators: These are layout items, like widgets in GTK+.
-  GtkContainer* related_group = GTK_CONTAINER(egg_tool_item_group_new(_("Records")));
+  GtkContainer* related_group = GTK_CONTAINER(gtk_tool_item_group_new(_("Records")));
   gtk_container_add(related_group, GTK_WIDGET(drag_related_records->gobj()));
 
-  add_group(EGG_TOOL_ITEM_GROUP(items_group));
-  add_group(EGG_TOOL_ITEM_GROUP(lines_group));
-  add_group(EGG_TOOL_ITEM_GROUP(related_group));
+  add_group(GTK_TOOL_ITEM_GROUP(items_group));
+  add_group(GTK_TOOL_ITEM_GROUP(lines_group));
+  add_group(GTK_TOOL_ITEM_GROUP(related_group));
 
   set_drag_source();
   
diff --git a/glom/mode_design/print_layouts/print_layout_toolbar_button.cc b/glom/mode_design/print_layouts/print_layout_toolbar_button.cc
index 3d4199f..d075e79 100644
--- a/glom/mode_design/print_layouts/print_layout_toolbar_button.cc
+++ b/glom/mode_design/print_layouts/print_layout_toolbar_button.cc
@@ -19,7 +19,7 @@
  */
  
 #include "print_layout_toolbar_button.h"
-#include <glom/utility_widgets/egg/toolpalette/eggtoolpalette.h>
+#include <gtk/gtktoolpalette.h>
 #include <iostream>
 
 namespace
@@ -70,13 +70,13 @@ PrintLayoutToolbarButton::enumItems PrintLayoutToolbarButton::get_item_type_from
 
   //Put this code in the toolbar class:
   Gtk::Widget* palette = drag_get_source_widget(drag_context);
-  while(palette && !EGG_IS_TOOL_PALETTE (palette->gobj()))
+  while(palette && !GTK_IS_TOOL_PALETTE (palette->gobj()))
     palette = palette->get_parent();
   
   if(!palette)
     return result;
 
-  GtkWidget* tool_item = egg_tool_palette_get_drag_item(EGG_TOOL_PALETTE (palette->gobj()), selection_data.gobj());
+  GtkWidget* tool_item = gtk_tool_palette_get_drag_item(GTK_TOOL_PALETTE (palette->gobj()), selection_data.gobj());
   if(!tool_item)
     return result;
 
diff --git a/glom/mode_design/print_layouts/window_print_layout_edit.cc b/glom/mode_design/print_layouts/window_print_layout_edit.cc
index 92d8e98..7fa8b2a 100644
--- a/glom/mode_design/print_layouts/window_print_layout_edit.cc
+++ b/glom/mode_design/print_layouts/window_print_layout_edit.cc
@@ -78,7 +78,7 @@ Window_PrintLayout_Edit::Window_PrintLayout_Edit(BaseObjectType* cobject, const
   m_canvas.show();
 
   //Make the canvas a drag-and-drop destination:
-  const GtkTargetEntry* target_entry = egg_tool_palette_get_drag_target_item();
+  const GtkTargetEntry* target_entry = gtk_tool_palette_get_drag_target_item();
   Gtk::TargetEntry toolbar_target(*target_entry);
   m_drag_targets.push_back(toolbar_target);
 
diff --git a/glom/utility_widgets/flowtable_dnd.cc b/glom/utility_widgets/flowtable_dnd.cc
index 354622f..ec7f701 100644
--- a/glom/utility_widgets/flowtable_dnd.cc
+++ b/glom/utility_widgets/flowtable_dnd.cc
@@ -20,7 +20,7 @@
 
 #include "flowtable_dnd.h"
 #include "../mode_data/flowtablewithfields.h"
-#include "egg/toolpalette/eggtoolpalette.h"
+#include <gtk/gtktoolpalette.h>
 #include "placeholder-glom.h"
 #include "layouttoolbarbutton.h"
 #include "entryglom.h"
@@ -39,7 +39,7 @@ FlowTableDnd::FlowTableDnd() :
 {
   std::list<Gtk::TargetEntry> drag_targets;
 
-  const GtkTargetEntry* target_entry = egg_tool_palette_get_drag_target_item();
+  const GtkTargetEntry* target_entry = gtk_tool_palette_get_drag_target_item();
   Gtk::TargetEntry toolbar_target(*target_entry);
   drag_targets.push_back(toolbar_target);
 
@@ -88,7 +88,7 @@ void FlowTableDnd::start_dnd(Gtk::Widget& child)
   if(!(child.get_flags() & Gtk::NO_WINDOW))
   { 
     std::list<Gtk::TargetEntry> drag_targets;
-    const GtkTargetEntry* target_entry = egg_tool_palette_get_drag_target_item();
+    const GtkTargetEntry* target_entry = gtk_tool_palette_get_drag_target_item();
     Gtk::TargetEntry toolbar_target(*target_entry);
     Gtk::TargetEntry move_target(MOVE_TARGET);
     drag_targets.push_back(toolbar_target);
@@ -182,14 +182,14 @@ void FlowTableDnd::on_dnd_remove_placeholder()
 void FlowTableDnd::on_drag_data_received(const Glib::RefPtr<Gdk::DragContext>& drag_context, int /* drag_x */, int /* drag_y */, const Gtk::SelectionData& selection_data, guint, guint /* time */)
 {
   Gtk::Widget* palette = drag_get_source_widget(drag_context);
-  while(palette && !EGG_IS_TOOL_PALETTE(palette->gobj()))
+  while(palette && !GTK_IS_TOOL_PALETTE(palette->gobj()))
     palette = palette->get_parent();
   
   on_dnd_remove_placeholder();
   Gtk::Widget* above = dnd_datawidget_from_item(0);
   if(palette)
   {
-    GtkWidget* tool_item = egg_tool_palette_get_drag_item(EGG_TOOL_PALETTE(palette->gobj()), selection_data.gobj());
+    GtkWidget* tool_item = gtk_tool_palette_get_drag_item(GTK_TOOL_PALETTE(palette->gobj()), selection_data.gobj());
     const int type = GPOINTER_TO_INT(g_object_get_data(G_OBJECT(tool_item), "glom-type"));
     on_dnd_add_layout_item_by_type(type, above);
   }
diff --git a/glom/utility_widgets/layouttoolbar.cc b/glom/utility_widgets/layouttoolbar.cc
index 6cf17d7..51a73f7 100644
--- a/glom/utility_widgets/layouttoolbar.cc
+++ b/glom/utility_widgets/layouttoolbar.cc
@@ -25,7 +25,7 @@
 #include <libglom/libglom_config.h>
 
 #include "layoutwidgetbase.h"
-#include "egg/toolpalette/eggtoolitemgroup.h"
+#include <gtk/gtktoolitemgroup.h>
 
 namespace
 {
@@ -79,20 +79,20 @@ LayoutToolbar::LayoutToolbar()
   //TODO: Add a drag item for the related records item.
   
   //Note for translators: These are container layout items, containing child layout items, like container widgets in GTK+.
-  GtkContainer* container_group = GTK_CONTAINER(egg_tool_item_group_new(_("Containers")));
+  GtkContainer* container_group = GTK_CONTAINER(gtk_tool_item_group_new(_("Containers")));
   gtk_container_add(container_group, GTK_WIDGET(drag_group->gobj()));
   gtk_container_add(container_group, GTK_WIDGET(drag_notebook->gobj()));
 
   //Note for translators: These are layout items, like widgets in GTK+.
-  GtkContainer* fields_group = GTK_CONTAINER(egg_tool_item_group_new(_("Items")));
+  GtkContainer* fields_group = GTK_CONTAINER(gtk_tool_item_group_new(_("Items")));
   gtk_container_add(fields_group, GTK_WIDGET(drag_portal->gobj()));
   gtk_container_add(fields_group, GTK_WIDGET(drag_item->gobj()));
   gtk_container_add(fields_group, GTK_WIDGET(drag_button->gobj()));  
   gtk_container_add(fields_group, GTK_WIDGET(drag_text->gobj()));
   gtk_container_add(fields_group, GTK_WIDGET(drag_image->gobj()));
   
-  add_group(EGG_TOOL_ITEM_GROUP(container_group));
-  add_group(EGG_TOOL_ITEM_GROUP(fields_group));
+  add_group(GTK_TOOL_ITEM_GROUP(container_group));
+  add_group(GTK_TOOL_ITEM_GROUP(fields_group));
 
   set_drag_source();
   
diff --git a/glom/utility_widgets/sidebar.cc b/glom/utility_widgets/sidebar.cc
index 8ce4d52..a83d69c 100644
--- a/glom/utility_widgets/sidebar.cc
+++ b/glom/utility_widgets/sidebar.cc
@@ -30,8 +30,8 @@ SideBar::SideBar()
   set_handle_position(Gtk::POS_TOP);
   set_snap_edge(Gtk::POS_TOP);
   
-  palette = EGG_TOOL_PALETTE(egg_tool_palette_new());
-  egg_tool_palette_set_style (palette, GTK_TOOLBAR_BOTH_HORIZ);
+  palette = GTK_TOOL_PALETTE(gtk_tool_palette_new());
+  gtk_tool_palette_set_style (palette, GTK_TOOLBAR_BOTH_HORIZ);
   Gtk::Container* container = Glib::wrap(GTK_CONTAINER(palette));
   
   add(*container);
@@ -43,12 +43,12 @@ SideBar::~SideBar()
 {
 }
 
-void SideBar::add_group(EggToolItemGroup* group)
+void SideBar::add_group(GtkToolItemGroup* group)
 {
   gtk_container_add(GTK_CONTAINER(palette), GTK_WIDGET(group));
 }
 
-void SideBar::remove_group(EggToolItemGroup* group)
+void SideBar::remove_group(GtkToolItemGroup* group)
 {
   gtk_container_remove(GTK_CONTAINER(palette), GTK_WIDGET(group));
 }
@@ -56,7 +56,7 @@ void SideBar::remove_group(EggToolItemGroup* group)
 void SideBar::set_drag_source()
 {
   // It's important to call this AFTER all groups have been added
-  egg_tool_palette_set_drag_source(palette, EGG_TOOL_PALETTE_DRAG_ITEMS);
+  gtk_tool_palette_set_drag_source(palette, GTK_TOOL_PALETTE_DRAG_ITEMS);
 }
 
 void SideBar::on_child_detached(Gtk::Widget* child)
diff --git a/glom/utility_widgets/sidebar.h b/glom/utility_widgets/sidebar.h
index 09edf1c..1be2101 100644
--- a/glom/utility_widgets/sidebar.h
+++ b/glom/utility_widgets/sidebar.h
@@ -25,8 +25,8 @@
 #include <gtkmm/handlebox.h>
 #include <gtkmm/box.h>
 #include <gtkmm/button.h>
-#include "egg/toolpalette/eggtoolpalette.h"
-#include "egg/toolpalette/eggtoolitemgroup.h"
+#include "gtkmm/toolpalette.h"
+#include "gtk/gtktoolpalette.h"
 
 namespace Glom
 {
@@ -37,8 +37,8 @@ public:
   SideBar();
   ~SideBar();
     
-  void add_group(EggToolItemGroup* group);
-  void remove_group(EggToolItemGroup* group);
+  void add_group(GtkToolItemGroup* group);
+  void remove_group(GtkToolItemGroup* group);
   
   void set_drag_source();
 
@@ -47,7 +47,7 @@ private:
   virtual void on_child_attached(Gtk::Widget* child);
     
 private:
-  EggToolPalette* palette;
+  GtkToolPalette* palette;
     
   int m_width;
   int m_height;



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