[glade3/project-tree-model] signal-editor: As this derives from GtkVBox there is no need to call get_widget()



commit 2e58dba5ef28ac1f1d3153a8e4335af098982984
Author: Johannes Schmid <jhs gnome org>
Date:   Fri May 7 16:47:41 2010 +0200

    signal-editor: As this derives from GtkVBox there is no need to call get_widget()
    
    Also fixed files that calles get_widget() to just use the editor instead.

 gladeui/glade-base-editor.c   |   13 ++++++-------
 gladeui/glade-editor.c        |    6 +++---
 gladeui/glade-signal-editor.c |   15 ---------------
 gladeui/glade-signal-editor.h |    2 --
 4 files changed, 9 insertions(+), 27 deletions(-)
---
diff --git a/gladeui/glade-base-editor.c b/gladeui/glade-base-editor.c
index 583a926..3746c91 100644
--- a/gladeui/glade-base-editor.c
+++ b/gladeui/glade-base-editor.c
@@ -70,7 +70,7 @@ struct _GladeBaseEditorPrivate
 	/* Editor UI */
 	GtkSizeGroup *group;
 	GtkWidget *paned, *table, *treeview, *main_scroll, *notebook;
-	GtkWidget *remove_button, *signal_editor_w;
+	GtkWidget *remove_button;
 	GladeSignalEditor *signal_editor;
 
 	GList *child_types;
@@ -1782,10 +1782,9 @@ glade_base_editor_init (GladeBaseEditor *editor)
 
 	/* Signal Editor */
 	e->signal_editor = glade_signal_editor_new (NULL);
-	e->signal_editor_w = glade_signal_editor_get_widget (e->signal_editor);
-	gtk_widget_show (e->signal_editor_w);
-	gtk_widget_set_size_request (e->signal_editor_w, -1, 96);
-	gtk_paned_pack2 (GTK_PANED (paned), e->signal_editor_w, FALSE, FALSE);
+	gtk_widget_show (GTK_WIDGET(e->signal_editor));
+	gtk_widget_set_size_request (GTK_WIDGET(e->signal_editor), -1, 96);
+	gtk_paned_pack2 (GTK_PANED (paned), GTK_WIDGET(e->signal_editor), FALSE, FALSE);
 	
 	/* Update the treeview on realize event */
 	g_signal_connect (editor, "realize",
@@ -2145,9 +2144,9 @@ glade_base_editor_set_show_signal_editor (GladeBaseEditor *editor, gboolean val)
 	g_return_if_fail (GLADE_IS_BASE_EDITOR (editor));
 	
 	if (val)
-		gtk_widget_show (editor->priv->signal_editor_w);
+		gtk_widget_show (GTK_WIDGET(editor->priv->signal_editor));
 	else
-		gtk_widget_hide (editor->priv->signal_editor_w);
+		gtk_widget_hide (GTK_WIDGET(editor->priv->signal_editor));
 }
 
 /* Convenience functions */
diff --git a/gladeui/glade-editor.c b/gladeui/glade-editor.c
index 26f7e37..21935e7 100644
--- a/gladeui/glade-editor.c
+++ b/gladeui/glade-editor.c
@@ -586,11 +586,11 @@ glade_editor_set_signal_editor (GladeEditor *editor, GladeSignalEditor *signal_e
 {
 	if (editor->signal_editor) {
 		gtk_container_remove (GTK_CONTAINER (editor->page_signals),
-		                      glade_signal_editor_get_widget (editor->signal_editor));
+		                      GTK_WIDGET(editor->signal_editor));
 	}
 	editor->signal_editor = signal_editor;
 	gtk_container_add (GTK_CONTAINER (editor->page_signals),
-			    glade_signal_editor_get_widget (editor->signal_editor));
+	                   GTK_WIDGET(editor->signal_editor));
 }
 
 static void
@@ -599,7 +599,7 @@ glade_editor_load_signal_page (GladeEditor *editor)
 	if (editor->signal_editor == NULL) {
 		editor->signal_editor = glade_signal_editor_new ((gpointer) editor);
 		gtk_container_add (GTK_CONTAINER (editor->page_signals),
-				    glade_signal_editor_get_widget (editor->signal_editor));
+				   GTK_WIDGET(editor->signal_editor));
 	}
 }
 
diff --git a/gladeui/glade-signal-editor.c b/gladeui/glade-signal-editor.c
index f6d9cf7..e5470b0 100644
--- a/gladeui/glade-signal-editor.c
+++ b/gladeui/glade-signal-editor.c
@@ -1136,21 +1136,6 @@ glade_signal_editor_constructor (GType                  type,
 }
 
 /**
- * glade_signal_editor_get_widget:
- * @editor: a #GladeSignalEditor
- *
- * Returns: the #GtkWidget that is the main window for @editor, or %NULL if
- *          it does not exist
- */
-GtkWidget *
-glade_signal_editor_get_widget (GladeSignalEditor *editor)
-{
-	g_return_val_if_fail (GLADE_IS_SIGNAL_EDITOR (editor), NULL);
-
-	return GTK_WIDGET (editor);
-}
-
-/**
  * glade_signal_editor_new:
  * @editor: a #GladeEditor
  *
diff --git a/gladeui/glade-signal-editor.h b/gladeui/glade-signal-editor.h
index 5322a73..8a8ef2d 100644
--- a/gladeui/glade-signal-editor.h
+++ b/gladeui/glade-signal-editor.h
@@ -39,8 +39,6 @@ GladeSignalEditor *glade_signal_editor_new (gpointer *editor);
 
 void glade_signal_editor_construct_signals_list (GladeSignalEditor *editor);
 
-GtkWidget *glade_signal_editor_get_widget (GladeSignalEditor *editor);
-
 void glade_signal_editor_load_widget (GladeSignalEditor *editor, GladeWidget *widget);
 
 G_END_DECLS



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