[glade3] * gladeui/Makefile.am, gladeui/glade.h, gladeui/glade-clipboard.c, gladeui/glade-app.[ch], src/g



commit a334a9d2685b380cc24c959a5f47fcb04c636b72
Author: Tristan Van Berkom <tristan van berkom gmail com>
Date:   Tue Dec 28 14:45:55 2010 +0900

    	* gladeui/Makefile.am, gladeui/glade.h, gladeui/glade-clipboard.c, gladeui/glade-app.[ch],
    	  src/glade-window.c, gladeui/glade-clipboard-view.[ch]:
    	Removed GladeClipboradView completely.

 ChangeLog                      |    6 +
 gladeui/Makefile.am            |    2 -
 gladeui/glade-app.c            |   20 --
 gladeui/glade-app.h            |    8 +-
 gladeui/glade-clipboard-view.c |  388 ----------------------------------------
 gladeui/glade-clipboard-view.h |   52 ------
 gladeui/glade-clipboard.c      |   22 +---
 gladeui/glade.h                |    1 -
 src/glade-window.c             |    6 +-
 9 files changed, 11 insertions(+), 494 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index b5efca7..755aabf 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2010-12-28  Tristan Van Berkom <tristanvb openismus com>
+
+	* gladeui/Makefile.am, gladeui/glade.h, gladeui/glade-clipboard.c, gladeui/glade-app.[ch],
+	  src/glade-window.c, gladeui/glade-clipboard-view.[ch]:
+	Removed GladeClipboradView completely.
+
 2010-12-27  Tristan Van Berkom <tristanvb openismus com>
 
 	* gladeui/glade-project.c: Fixed glade-project to unset the loading flag when
diff --git a/gladeui/Makefile.am b/gladeui/Makefile.am
index 2d2858c..f0f920a 100644
--- a/gladeui/Makefile.am
+++ b/gladeui/Makefile.am
@@ -72,7 +72,6 @@ libgladeui_2_la_SOURCES = \
 	glade-signal.c \
 	glade-signal-editor.c \
 	glade-clipboard.c \
-	glade-clipboard-view.c \
 	glade-command.c \
 	glade-id-allocator.c \
 	glade-id-allocator.h \
@@ -129,7 +128,6 @@ libgladeuiinclude_HEADERS = \
 	glade-property-class.h \
 	glade-utils.h \
 	glade-clipboard.h \
-	glade-clipboard-view.h \
 	glade-command.h \
 	glade-app.h \
 	glade-builtins.h \
diff --git a/gladeui/glade-app.c b/gladeui/glade-app.c
index e600dba..796aa99 100644
--- a/gladeui/glade-app.c
+++ b/gladeui/glade-app.c
@@ -33,7 +33,6 @@
  */
 
 #include "glade.h"
-#include "glade-clipboard-view.h"
 #include "glade-debug.h"
 #include "glade-cursor.h"
 #include "glade-catalog.h"
@@ -304,13 +303,6 @@ glade_app_signal_editor_created_default (GladeApp *app, GladeSignalEditor *signa
 	glade_signal_editor_construct_signals_list (signal_editor);
 }
 
-static gboolean
-clipboard_view_on_delete_cb (GtkWidget *clipboard_view, GdkEvent *e, GladeApp *app)
-{
-	glade_util_hide_window (GTK_WINDOW (clipboard_view));
-	return TRUE;
-}
-
 static GKeyFile *
 glade_app_config_load (GladeApp *app)
 {
@@ -455,11 +447,6 @@ glade_app_init (GladeApp *app)
 	
 	/* Create clipboard */
 	app->priv->clipboard = glade_clipboard_new ();
-	app->priv->clipboard->view = glade_clipboard_view_new (app->priv->clipboard);
-	gtk_window_set_title (GTK_WINDOW (app->priv->clipboard->view), _("Clipboard"));
-	g_signal_connect_after (G_OBJECT (app->priv->clipboard->view), "delete_event",
-			  G_CALLBACK (clipboard_view_on_delete_cb),
-			  app);
 
 	/* Load the configuration file */
 	app->priv->config = glade_app_config_load (app);
@@ -801,13 +788,6 @@ glade_app_get_clipboard (void)
 	return app->priv->clipboard;
 }
 
-GtkWidget *
-glade_app_get_clipboard_view (void)
-{
-	GladeApp *app = glade_app_get ();
-	return app->priv->clipboard->view;
-}
-
 GladeProject *
 glade_app_get_project (void)
 {
diff --git a/gladeui/glade-app.h b/gladeui/glade-app.h
index 87000d1..6570baa 100644
--- a/gladeui/glade-app.h
+++ b/gladeui/glade-app.h
@@ -105,14 +105,12 @@ gboolean           glade_app_get_catalog_version (const gchar *name, gint *major
 GList             *glade_app_get_catalogs (void);
 
 GladeCatalog      *glade_app_get_catalog (const gchar *name);
- 
+
 GladeEditor*       glade_app_get_editor (void);
- 
+
 GladePalette*      glade_app_get_palette (void);
- 
+
 GladeClipboard*    glade_app_get_clipboard (void);
- 
-GtkWidget*         glade_app_get_clipboard_view (void);
 
 GladeProject*      glade_app_get_project (void);
 
diff --git a/gladeui/glade-clipboard.c b/gladeui/glade-clipboard.c
index 9e69e2e..e847312 100644
--- a/gladeui/glade-clipboard.c
+++ b/gladeui/glade-clipboard.c
@@ -36,7 +36,6 @@
 
 #include <glib/gi18n-lib.h>
 #include "glade.h"
-#include "glade-clipboard-view.h"
 #include "glade-clipboard.h"
 #include "glade-widget.h"
 #include "glade-placeholder.h"
@@ -89,7 +88,6 @@ static void
 glade_clipboard_init (GladeClipboard *clipboard)
 {
 	clipboard->widgets   = NULL;
-	clipboard->view      = NULL;
 	clipboard->selection = NULL;
 	clipboard->has_selection = FALSE;
 }
@@ -186,17 +184,8 @@ glade_clipboard_add (GladeClipboard *clipboard, GList *widgets)
 		clipboard->widgets = 
 			g_list_prepend (clipboard->widgets, 
 					g_object_ref (G_OBJECT (widget)));
-		/*
-		 * Update view.
-		 */
+
 		glade_clipboard_selection_add (clipboard, widget);
-		if (clipboard->view)
-		{
-			glade_clipboard_view_add
-				(GLADE_CLIPBOARD_VIEW (clipboard->view), widget);
-			glade_clipboard_view_refresh_sel 
-				(GLADE_CLIPBOARD_VIEW (clipboard->view));
-		}
 	}
 
 }
@@ -221,13 +210,6 @@ glade_clipboard_remove (GladeClipboard *clipboard, GList *widgets)
 		clipboard->widgets   = 
 			g_list_remove (clipboard->widgets, widget);
 		glade_clipboard_selection_remove (clipboard, widget);
-
-		/*
-		 * If there is a view present, update it.
-		 */
-		if (clipboard->view)
-			glade_clipboard_view_remove
-				(GLADE_CLIPBOARD_VIEW (clipboard->view), widget);
 		
 		g_object_unref (G_OBJECT (widget));
 	}
@@ -240,8 +222,6 @@ glade_clipboard_remove (GladeClipboard *clipboard, GList *widgets)
 	{
 		glade_clipboard_selection_add
 			(clipboard, GLADE_WIDGET (list->data));
-		glade_clipboard_view_refresh_sel 
-			(GLADE_CLIPBOARD_VIEW (clipboard->view));
 	}
 }
 
diff --git a/gladeui/glade.h b/gladeui/glade.h
index 580fbc4..32ae7c7 100644
--- a/gladeui/glade.h
+++ b/gladeui/glade.h
@@ -37,7 +37,6 @@
 #include <gladeui/glade-editor-property.h>
 #include <gladeui/glade-palette.h>
 #include <gladeui/glade-clipboard.h>
-#include <gladeui/glade-clipboard-view.h>
 #include <gladeui/glade-inspector.h>
 #include <gladeui/glade-placeholder.h>
 #include <gladeui/glade-utils.h>
diff --git a/src/glade-window.c b/src/glade-window.c
index ee98864..fe832f9 100644
--- a/src/glade-window.c
+++ b/src/glade-window.c
@@ -3234,7 +3234,6 @@ glade_window_init (GladeWindow *window)
 	GtkWidget *widget;
 	GtkWidget *sep;
 	GtkAction *undo_action, *redo_action;
-	GtkAccelGroup *accel_group;	
 
 	window->priv = priv = GLADE_WINDOW_GET_PRIVATE (window);
 	
@@ -3300,6 +3299,7 @@ glade_window_init (GladeWindow *window)
 
 	/* notebook */
 	priv->notebook = gtk_notebook_new ();
+	gtk_notebook_set_scrollable (GTK_NOTEBOOK (priv->notebook), TRUE);
 
 	/* Show tabs (user preference) */
 	gtk_notebook_set_show_tabs (GTK_NOTEBOOK (priv->notebook), TRUE);
@@ -3438,10 +3438,6 @@ glade_window_init (GladeWindow *window)
 
 	glade_app_set_window (GTK_WIDGET (window));
 
-	accel_group = gtk_ui_manager_get_accel_group(priv->ui);
-
-	gtk_window_add_accel_group (GTK_WINDOW (glade_app_get_clipboard_view ()), accel_group);
-
 	glade_window_config_load (window);
 
 #ifdef MAC_INTEGRATION



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