[Glade-devel] [patch, glade3] rmove deprecated function from palette



--=-EMsF7rF4j0t2ZHYZY0fl
Content-Type: text/plain
Content-Transfer-Encoding: 7bit

Hi!

The attached patch removes the other deprecated function from
palette.[ch] and update the only caller.
While at it I also changed the generic check != NULL for the function
arguments to the specific GLADE_IS_PALETTE.

ciao
        paolo

--=-EMsF7rF4j0t2ZHYZY0fl
Content-Disposition: attachment; filename=palette-cleanup.patch
Content-Type: text/x-patch; name=palette-cleanup.patch; charset=UTF-8
Content-Transfer-Encoding: 7bit

diff -upr gnome2/glade3/ChangeLog glade3/ChangeLog
--- gnome2/glade3/ChangeLog     2003-05-02 09:08:41.000000000 +0200
+++ glade3/ChangeLog    2003-05-02 17:17:04.000000000 +0200
@@ -1,3 +1,8 @@
+2003-05-02  Paolo Borelli  <pborelli katamail com>
+
+       * src/glade-palette.[ch]: remove deprecated function
+       * src/glade-project-window.c: update for the above
+
 2003-05-01  Paolo Borelli  <pborelli katamail com>
 
        * src/glade-keys-dialog.[ch]: init of the keys dialog.
diff -upr gnome2/glade3/src/glade-palette.c glade3/src/glade-palette.c
--- gnome2/glade3/src/glade-palette.c   2003-05-02 09:08:58.000000000 +0200
+++ glade3/src/glade-palette.c  2003-05-02 17:03:37.000000000 +0200
@@ -121,7 +121,6 @@ glade_palette_selector_new (GladePalette
        return hbox;    
 }
 
-
 static GtkWidget *
 glade_palette_widget_create_icon_from_class (GladeWidgetClass *class)
 {
@@ -340,7 +339,7 @@ glade_palette_append_catalog (GladePalet
        GtkWidget *widget;
        gint *page;
 
-       g_return_if_fail (palette != NULL);
+       g_return_if_fail (GLADE_IS_PALETTE (palette));
        g_return_if_fail (catalog != NULL);
 
        /* Add the title of the catalog to the palette */
@@ -362,12 +361,8 @@ glade_palette_append_catalog (GladePalet
 void
 glade_palette_unselect_widget (GladePalette *palette)
 {
-       g_return_if_fail (palette != NULL);
+       g_return_if_fail (GLADE_IS_PALETTE (palette));
+
        gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (palette->dummy_button), TRUE);
 }
 
-void
-glade_palette_clear (GladeProjectWindow *gpw)
-{
-       glade_palette_unselect_widget(gpw->palette);
-}
diff -upr gnome2/glade3/src/glade-palette.h glade3/src/glade-palette.h
--- gnome2/glade3/src/glade-palette.h   2003-05-02 09:08:58.000000000 +0200
+++ glade3/src/glade-palette.h  2003-05-02 16:53:37.000000000 +0200
@@ -79,8 +79,6 @@ GladePalette *glade_palette_new    (GLis
 void glade_palette_append_catalog  (GladePalette *palette, GladeCatalog *catalog);
 void glade_palette_unselect_widget (GladePalette *palette);
 
-void glade_palette_clear  (GladeProjectWindow *gpw); // __attribute__ ((deprecated));
-
 G_END_DECLS
 
 #endif /* __GLADE_PALETTE_H__ */
diff -upr gnome2/glade3/src/glade-project-window.c glade3/src/glade-project-window.c
--- gnome2/glade3/src/glade-project-window.c    2003-05-02 09:08:59.000000000 +0200
+++ glade3/src/glade-project-window.c   2003-05-02 16:52:20.000000000 +0200
@@ -1127,8 +1127,7 @@ glade_project_window_set_add_class (Glad
        gpw->add_class = class;
 
        if (!class && gpw->palette)
-               glade_palette_clear (gpw);
-       
+               glade_palette_unselect_widget(gpw->palette);
 }
 
 GladeProject *

--=-EMsF7rF4j0t2ZHYZY0fl--





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