[gimp] app: Use 'create' not 'new' in dockable instance creation methods



commit e3b0bda9629f45b818d97af6309144013d2f2976
Author: Martin Nordholts <martinn src gnome org>
Date:   Mon Apr 19 04:32:18 2010 +0200

    app: Use 'create' not 'new' in dockable instance creation methods
    
    Use 'create' not 'new' in GimpDockable instance creation methods to be
    consistent with the rest of the code base.

 app/widgets/gimpdockable.c |   10 ++--
 app/widgets/gimpdockable.h |   98 ++++++++++++++++++++++----------------------
 app/widgets/gimpdockbook.c |   18 ++++----
 3 files changed, 63 insertions(+), 63 deletions(-)
---
diff --git a/app/widgets/gimpdockable.c b/app/widgets/gimpdockable.c
index ea4eb1e..6f2af2f 100644
--- a/app/widgets/gimpdockable.c
+++ b/app/widgets/gimpdockable.c
@@ -1097,10 +1097,10 @@ gimp_dockable_set_tab_style (GimpDockable *dockable,
 }
 
 GtkWidget *
-gimp_dockable_new_tab_widget (GimpDockable *dockable,
-                              GimpContext  *context,
-                              GimpTabStyle  tab_style,
-                              GtkIconSize   size)
+gimp_dockable_create_tab_widget (GimpDockable *dockable,
+                                 GimpContext  *context,
+                                 GimpTabStyle  tab_style,
+                                 GtkIconSize   size)
 {
   g_return_val_if_fail (GIMP_IS_DOCKABLE (dockable), NULL);
   g_return_val_if_fail (GIMP_IS_CONTEXT (context), NULL);
@@ -1110,7 +1110,7 @@ gimp_dockable_new_tab_widget (GimpDockable *dockable,
 }
 
 GtkWidget *
-gimp_dockable_new_drag_widget (GimpDockable *dockable)
+gimp_dockable_create_drag_widget (GimpDockable *dockable)
 {
   GtkWidget *frame;
   GtkWidget *widget;
diff --git a/app/widgets/gimpdockable.h b/app/widgets/gimpdockable.h
index 48a7086..a285b9e 100644
--- a/app/widgets/gimpdockable.h
+++ b/app/widgets/gimpdockable.h
@@ -56,55 +56,55 @@ struct _GimpDockableClass
 };
 
 
-GType           gimp_dockable_get_type         (void) G_GNUC_CONST;
-
-GtkWidget     * gimp_dockable_new              (const gchar    *name,
-                                                const gchar    *blurb,
-                                                const gchar    *stock_id,
-                                                const gchar    *help_id);
-void            gimp_dockable_set_dockbook     (GimpDockable   *dockable,
-                                                GimpDockbook   *dockbook);
-GimpDockbook  * gimp_dockable_get_dockbook     (GimpDockable   *dockable);
-GimpTabStyle    gimp_dockable_get_tab_style    (GimpDockable   *dockable);
-const gchar   * gimp_dockable_get_name         (GimpDockable   *dockable);
-const gchar   * gimp_dockable_get_blurb        (GimpDockable   *dockable);
-const gchar   * gimp_dockable_get_help_id      (GimpDockable   *dockable);
-gboolean        gimp_dockable_get_locked       (GimpDockable   *dockable);
-void            gimp_dockable_set_drag_pos     (GimpDockable   *dockable,
-                                                gint            drag_x,
-                                                gint            drag_y);
-void            gimp_dockable_get_drag_pos     (GimpDockable   *dockable,
-                                                gint           *drag_x,
-                                                gint           *drag_y);
-GimpPanedBox  * gimp_dockable_get_drag_handler (GimpDockable  *dockable);
-
-void            gimp_dockable_set_aux_info     (GimpDockable   *dockable,
-                                                GList          *aux_info);
-GList         * gimp_dockable_get_aux_info     (GimpDockable   *dockable);
-
-void            gimp_dockable_set_locked       (GimpDockable   *dockable,
-                                                gboolean        lock);
-gboolean        gimp_dockable_is_locked        (GimpDockable   *dockable);
-
-void            gimp_dockable_set_tab_style    (GimpDockable   *dockable,
-                                                GimpTabStyle    tab_style);
-GtkWidget     * gimp_dockable_new_tab_widget   (GimpDockable   *dockable,
-                                                GimpContext    *context,
-                                                GimpTabStyle    tab_style,
-                                                GtkIconSize     size);
-GtkWidget     * gimp_dockable_new_drag_widget  (GimpDockable   *dockable);
-void            gimp_dockable_set_context      (GimpDockable   *dockable,
-                                                GimpContext    *context);
-GimpUIManager * gimp_dockable_get_menu         (GimpDockable   *dockable,
-                                                const gchar   **ui_path,
-                                                gpointer       *popup_data);
-void            gimp_dockable_set_drag_handler (GimpDockable   *dockable,
-                                                GimpPanedBox   *drag_handler);
-
-void            gimp_dockable_detach           (GimpDockable   *dockable);
-
-void            gimp_dockable_blink            (GimpDockable   *dockable);
-void            gimp_dockable_blink_cancel     (GimpDockable   *dockable);
+GType           gimp_dockable_get_type                (void) G_GNUC_CONST;
+                                                      
+GtkWidget     * gimp_dockable_new                     (const gchar    *name,
+                                                       const gchar    *blurb,
+                                                       const gchar    *stock_id,
+                                                       const gchar    *help_id);
+void            gimp_dockable_set_dockbook            (GimpDockable   *dockable,
+                                                       GimpDockbook   *dockbook);
+GimpDockbook  * gimp_dockable_get_dockbook            (GimpDockable   *dockable);
+GimpTabStyle    gimp_dockable_get_tab_style           (GimpDockable   *dockable);
+const gchar   * gimp_dockable_get_name                (GimpDockable   *dockable);
+const gchar   * gimp_dockable_get_blurb               (GimpDockable   *dockable);
+const gchar   * gimp_dockable_get_help_id             (GimpDockable   *dockable);
+gboolean        gimp_dockable_get_locked              (GimpDockable   *dockable);
+void            gimp_dockable_set_drag_pos            (GimpDockable   *dockable,
+                                                       gint            drag_x,
+                                                       gint            drag_y);
+void            gimp_dockable_get_drag_pos            (GimpDockable   *dockable,
+                                                       gint           *drag_x,
+                                                       gint           *drag_y);
+GimpPanedBox  * gimp_dockable_get_drag_handler        (GimpDockable  *dockable);
+                                                      
+void            gimp_dockable_set_aux_info            (GimpDockable   *dockable,
+                                                       GList          *aux_info);
+GList         * gimp_dockable_get_aux_info            (GimpDockable   *dockable);
+                                                      
+void            gimp_dockable_set_locked              (GimpDockable   *dockable,
+                                                       gboolean        lock);
+gboolean        gimp_dockable_is_locked               (GimpDockable   *dockable);
+                                                      
+void            gimp_dockable_set_tab_style           (GimpDockable   *dockable,
+                                                       GimpTabStyle    tab_style);
+GtkWidget     * gimp_dockable_create_tab_widget       (GimpDockable   *dockable,
+                                                       GimpContext    *context,
+                                                       GimpTabStyle    tab_style,
+                                                       GtkIconSize     size);
+GtkWidget     * gimp_dockable_create_drag_widget      (GimpDockable   *dockable);
+void            gimp_dockable_set_context             (GimpDockable   *dockable,
+                                                       GimpContext    *context);
+GimpUIManager * gimp_dockable_get_menu                (GimpDockable   *dockable,
+                                                       const gchar   **ui_path,
+                                                       gpointer       *popup_data);
+void            gimp_dockable_set_drag_handler        (GimpDockable   *dockable,
+                                                       GimpPanedBox   *drag_handler);
+                                                      
+void            gimp_dockable_detach                  (GimpDockable   *dockable);
+                                                      
+void            gimp_dockable_blink                   (GimpDockable   *dockable);
+void            gimp_dockable_blink_cancel            (GimpDockable   *dockable);
 
 
 #endif /* __GIMP_DOCKABLE_H__ */
diff --git a/app/widgets/gimpdockbook.c b/app/widgets/gimpdockbook.c
index e896a20..2d4d1cf 100644
--- a/app/widgets/gimpdockbook.c
+++ b/app/widgets/gimpdockbook.c
@@ -468,10 +468,10 @@ gimp_dockbook_add (GimpDockbook *dockbook,
 
   /* For the notebook right-click menu, always use the icon style */
   menu_widget =
-    gimp_dockable_new_tab_widget (dockable,
-                                  gimp_dock_get_context (dockbook->p->dock),
-                                  GIMP_TAB_STYLE_ICON_BLURB,
-                                  MENU_WIDGET_ICON_SIZE);
+    gimp_dockable_create_tab_widget (dockable,
+                                     gimp_dock_get_context (dockbook->p->dock),
+                                     GIMP_TAB_STYLE_ICON_BLURB,
+                                     MENU_WIDGET_ICON_SIZE);
 
   g_return_if_fail (GTK_IS_WIDGET (menu_widget));
 
@@ -585,10 +585,10 @@ gimp_dockbook_create_tab_widget (GimpDockbook *dockbook,
                         NULL);
 
   tab_widget =
-    gimp_dockable_new_tab_widget (dockable,
-                                  gimp_dock_get_context (dockbook->p->dock),
-                                  gimp_dockable_get_tab_style (dockable),
-                                  tab_size);
+    gimp_dockable_create_tab_widget (dockable,
+                                     gimp_dock_get_context (dockbook->p->dock),
+                                     gimp_dockable_get_tab_style (dockable),
+                                     tab_size);
 
   if (! GIMP_IS_VIEW (tab_widget))
     {
@@ -815,7 +815,7 @@ gimp_dockbook_tab_drag_begin (GtkWidget      *widget,
   gtk_window_set_type_hint (GTK_WINDOW (window), GDK_WINDOW_TYPE_HINT_DND);
   gtk_window_set_screen (GTK_WINDOW (window), gtk_widget_get_screen (widget));
 
-  view = gimp_dockable_new_drag_widget (dockable);
+  view = gimp_dockable_create_drag_widget (dockable);
   gtk_container_add (GTK_CONTAINER (window), view);
   gtk_widget_show (view);
 



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