[glade3] * gladeui/glade-fixed.[ch] --> plugins/gtk+/glade-fixed.[ch]: Instead of privatizing GladeFixed, m



commit 00ee3d2fcd83781fd6b0894a1b3819bca0017bb1
Author: Tristan Van Berkom <tristan van berkom gmail com>
Date:   Tue Jan 4 18:00:06 2011 +0900

    	* gladeui/glade-fixed.[ch] --> plugins/gtk+/glade-fixed.[ch]:
    	Instead of privatizing GladeFixed, moved it to be a detail of the plugin backend.

 ChangeLog                               |    3 +++
 gladeui/Makefile.am                     |    2 --
 gladeui/glade-app.c                     |    1 -
 gladeui/glade-command.c                 |    1 -
 gladeui/glade-placeholder.c             |    8 +-------
 gladeui/glade-project.c                 |    9 ++-------
 gladeui/glade-utils.c                   |    1 -
 gladeui/glade-widget-adaptor.c          |    1 +
 gladeui/glade.h                         |    1 -
 plugins/gtk+/Makefile.am                |    6 ++++--
 {gladeui => plugins/gtk+}/glade-fixed.c |    8 ++++----
 {gladeui => plugins/gtk+}/glade-fixed.h |    0
 plugins/gtk+/glade-gtk.c                |    1 +
 13 files changed, 16 insertions(+), 26 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 295beff..1aa97b5 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -22,6 +22,9 @@
 
 	* plugins/gtk+/*.c: updated all custom editors to used eprop accessors now
 
+	* gladeui/glade-fixed.[ch] --> plugins/gtk+/glade-fixed.[ch]:
+	Instead of privatizing GladeFixed, moved it to be a detail of the plugin backend.
+
 2011-01-03  Tristan Van Berkom <tristanvb openismus com>
 
 	* gladeui/glade-app.[ch]:
diff --git a/gladeui/Makefile.am b/gladeui/Makefile.am
index 48b8a31..484b9aa 100644
--- a/gladeui/Makefile.am
+++ b/gladeui/Makefile.am
@@ -78,7 +78,6 @@ libgladeui_2_la_SOURCES = \
 	glade-accumulators.c \
 	glade-builtins.c \
 	glade-app.c \
-	glade-fixed.c \
 	glade-base-editor.c \
 	glade-popup.h \
 	glade-marshallers.h \
@@ -129,7 +128,6 @@ libgladeuiinclude_HEADERS = \
 	glade-command.h \
 	glade-app.h \
 	glade-builtins.h \
-	glade-fixed.h \
 	glade-base-editor.h \
 	glade-xml-utils.h \
 	glade-signal.h \
diff --git a/gladeui/glade-app.c b/gladeui/glade-app.c
index dd24926..08ea674 100644
--- a/gladeui/glade-app.c
+++ b/gladeui/glade-app.c
@@ -35,7 +35,6 @@
 #include "glade-debug.h"
 #include "glade-cursor.h"
 #include "glade-catalog.h"
-#include "glade-fixed.h"
 #include "glade-design-view.h"
 #include "glade-marshallers.h"
 #include "glade-accumulators.h"
diff --git a/gladeui/glade-command.c b/gladeui/glade-command.c
index 50280e7..2dfa293 100644
--- a/gladeui/glade-command.c
+++ b/gladeui/glade-command.c
@@ -47,7 +47,6 @@
 #include "glade-clipboard.h"
 #include "glade-signal.h"
 #include "glade-app.h"
-#include "glade-fixed.h"
 #include "glade-name-context.h"
 
 /* Concerning placeholders: we do not hold any reference to placeholders,
diff --git a/gladeui/glade-placeholder.c b/gladeui/glade-placeholder.c
index bdefaeb..793b9d8 100644
--- a/gladeui/glade-placeholder.c
+++ b/gladeui/glade-placeholder.c
@@ -418,13 +418,7 @@ glade_placeholder_motion_notify_event (GtkWidget * widget,
   project      = glade_placeholder_get_project (GLADE_PLACEHOLDER (widget));
   pointer_mode = glade_project_get_pointer_mode (project);
 
-  if (pointer_mode == GLADE_POINTER_SELECT &&
-      /* If we are the child of a widget that is in a GladeFixed, then
-       * we are the means of drag/resize and we dont want to fight for
-       * the cursor (ideally; GladeCursor should somehow deal with such
-       * concurrencies I suppose).
-       */
-      (gparent_parent && GLADE_IS_FIXED (gparent_parent)) == FALSE)
+  if (pointer_mode == GLADE_POINTER_SELECT)
     glade_cursor_set (project, event->window, GLADE_CURSOR_SELECTOR);
   else if (pointer_mode == GLADE_POINTER_ADD_WIDGET)
     glade_cursor_set (project, event->window, GLADE_CURSOR_ADD_WIDGET);
diff --git a/gladeui/glade-project.c b/gladeui/glade-project.c
index 4bc7ee1..77774e7 100644
--- a/gladeui/glade-project.c
+++ b/gladeui/glade-project.c
@@ -5011,7 +5011,6 @@ glade_project_command_paste (GladeProject     *project,
   GList *list;
   GladeWidget *widget = NULL, *parent;
   gint placeholder_relations = 0;
-  GladeFixed *fixed = NULL;
 
   g_return_if_fail (GLADE_IS_PROJECT (project));
 
@@ -5042,9 +5041,6 @@ glade_project_command_paste (GladeProject     *project,
       widget && GWA_IS_TOPLEVEL (glade_widget_get_adaptor (widget)))
     parent = NULL;
 
-  if (parent && GLADE_IS_FIXED (parent))
-    fixed = GLADE_FIXED (parent);
-
   /* Check if parent is actually a container of any sort */
   if (parent && !glade_widget_adaptor_is_container (glade_widget_get_adaptor (parent)))
     {
@@ -5098,12 +5094,11 @@ glade_project_command_paste (GladeProject     *project,
 
   g_assert (widget);
 
-  /* A GladeFixed that doesnt use placeholders can only paste one
+  /* A GladeWidget that doesnt use placeholders can only paste one
    * at a time
    */
   if (GTK_IS_WIDGET (glade_widget_get_object (widget)) &&
-      parent && fixed && 
-      !GWA_USE_PLACEHOLDERS (glade_widget_get_adaptor (parent)) &&
+      parent && !GWA_USE_PLACEHOLDERS (glade_widget_get_adaptor (parent)) &&
       g_list_length (clipboard->widgets) != 1)
     {
       glade_util_ui_message (glade_app_get_window (),
diff --git a/gladeui/glade-utils.c b/gladeui/glade-utils.c
index a6f1fe6..b217517 100644
--- a/gladeui/glade-utils.c
+++ b/gladeui/glade-utils.c
@@ -39,7 +39,6 @@
 #include "glade-property.h"
 #include "glade-property-class.h"
 #include "glade-clipboard.h"
-#include "glade-fixed.h"
 
 #include <string.h>
 #include <gdk/gdkkeysyms.h>
diff --git a/gladeui/glade-widget-adaptor.c b/gladeui/glade-widget-adaptor.c
index 734a324..ca2da28 100644
--- a/gladeui/glade-widget-adaptor.c
+++ b/gladeui/glade-widget-adaptor.c
@@ -41,6 +41,7 @@
 #include "glade-accumulators.h"
 #include "glade-displayable-values.h"
 #include "glade-editor-table.h"
+#include "glade-cursor.h"
 
 /* For g_file_exists */
 #include <sys/types.h>
diff --git a/gladeui/glade.h b/gladeui/glade.h
index 867fe73..a62e07b 100644
--- a/gladeui/glade.h
+++ b/gladeui/glade.h
@@ -40,7 +40,6 @@
 #include <gladeui/glade-placeholder.h>
 #include <gladeui/glade-utils.h>
 #include <gladeui/glade-builtins.h>
-#include <gladeui/glade-fixed.h>
 #include <gladeui/glade-name-context.h>
 #include <gladeui/glade-editable.h>
 #include <gladeui/glade-displayable-values.h>
diff --git a/plugins/gtk+/Makefile.am b/plugins/gtk+/Makefile.am
index 2ca0fc1..3dc1cab 100644
--- a/plugins/gtk+/Makefile.am
+++ b/plugins/gtk+/Makefile.am
@@ -24,7 +24,8 @@ libgladegtk_la_SOURCES     = glade-gtk.c glade-accels.c glade-attributes.c fixed
 	glade-column-types.c  glade-model-data.c glade-text-button.c \
 	glade-icon-sources.c glade-button-editor.c glade-tool-button-editor.c glade-image-editor.c \
 	glade-image-item-editor.c glade-icon-factory-editor.c glade-store-editor.c glade-label-editor.c \
-	glade-cell-renderer-editor.c glade-treeview-editor.c glade-entry-editor.c glade-activatable-editor.c
+	glade-cell-renderer-editor.c glade-treeview-editor.c glade-entry-editor.c glade-activatable-editor.c \
+	glade-fixed.c
 
 libgladegtk_la_LDFLAGS     = -module -avoid-version $(AM_LDFLAGS)
 libgladegtk_la_LIBADD      = $(libgladeui) $(GTK_LIBS)
@@ -34,7 +35,8 @@ libgladegtkinclude_HEADERS = glade-gtk.h glade-accels.h glade-attributes.h glade
 	glade-text-button.h glade-icon-sources.h glade-button-editor.h \
 	glade-tool-button-editor.h glade-image-editor.h glade-image-item-editor.h glade-icon-factory-editor.h \
 	glade-store-editor.h glade-label-editor.h glade-cell-renderer-editor.h glade-treeview-editor.h \
-	glade-entry-editor.h glade-activatable-editor.h
+	glade-entry-editor.h glade-activatable-editor.h glade-fixed.h
+
 
 if PLATFORM_WIN32
 libgladegtk_la_LDFLAGS += -no-undefined
diff --git a/gladeui/glade-fixed.c b/plugins/gtk+/glade-fixed.c
similarity index 99%
rename from gladeui/glade-fixed.c
rename to plugins/gtk+/glade-fixed.c
index eb4fbf4..140417e 100644
--- a/gladeui/glade-fixed.c
+++ b/plugins/gtk+/glade-fixed.c
@@ -52,10 +52,10 @@
 #include <glib/gi18n-lib.h>
 #include <gdk/gdkkeysyms.h>
 
-#include "glade.h"
-#include "glade-accumulators.h"
-#include "glade-marshallers.h"
-#include "glade-popup.h"
+#include <gladeui/glade.h>
+#include <gladeui/glade-accumulators.h>
+#include <gladeui/glade-marshallers.h>
+#include <gladeui/glade-popup.h>
 #include "glade-fixed.h"
 
 /* properties */
diff --git a/gladeui/glade-fixed.h b/plugins/gtk+/glade-fixed.h
similarity index 100%
rename from gladeui/glade-fixed.h
rename to plugins/gtk+/glade-fixed.h
diff --git a/plugins/gtk+/glade-gtk.c b/plugins/gtk+/glade-gtk.c
index 3249cec..c64bcdc 100644
--- a/plugins/gtk+/glade-gtk.c
+++ b/plugins/gtk+/glade-gtk.c
@@ -42,6 +42,7 @@
 #include "glade-treeview-editor.h"
 #include "glade-entry-editor.h"
 #include "glade-activatable-editor.h"
+#include "glade-fixed.h"
 
 #include <gladeui/glade-editor-property.h>
 #include <gladeui/glade-base-editor.h>



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