diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/caja-connect-server-dialog.c | 9 | ||||
-rw-r--r-- | src/caja-connect-server-dialog.h | 4 | ||||
-rw-r--r-- | src/caja-navigation-window.c | 6 | ||||
-rw-r--r-- | src/caja-navigation-window.h | 4 | ||||
-rw-r--r-- | src/caja-property-browser.c | 10 | ||||
-rw-r--r-- | src/caja-property-browser.h | 4 | ||||
-rw-r--r-- | src/caja-sidebar-title.c | 10 | ||||
-rw-r--r-- | src/caja-sidebar-title.h | 4 | ||||
-rw-r--r-- | src/caja-trash-bar.c | 8 | ||||
-rw-r--r-- | src/caja-trash-bar.h | 29 | ||||
-rw-r--r-- | src/caja-window-private.h | 4 | ||||
-rw-r--r-- | src/caja-window.c | 7 | ||||
-rw-r--r-- | src/caja-window.h | 4 | ||||
-rw-r--r-- | src/caja-zoom-action.c | 12 | ||||
-rw-r--r-- | src/caja-zoom-action.h | 2 | ||||
-rw-r--r-- | src/caja-zoom-control.c | 8 | ||||
-rw-r--r-- | src/caja-zoom-control.h | 4 | ||||
-rw-r--r-- | src/file-manager/fm-desktop-icon-view.c | 52 | ||||
-rw-r--r-- | src/file-manager/fm-desktop-icon-view.h | 4 | ||||
-rw-r--r-- | src/file-manager/fm-properties-window.c | 10 | ||||
-rw-r--r-- | src/file-manager/fm-properties-window.h | 4 |
21 files changed, 81 insertions, 118 deletions
diff --git a/src/caja-connect-server-dialog.c b/src/caja-connect-server-dialog.c index 4cd9f5db..65cfb8ed 100644 --- a/src/caja-connect-server-dialog.c +++ b/src/caja-connect-server-dialog.c @@ -45,7 +45,7 @@ * - NetworkManager integration */ -struct _CajaConnectServerDialogDetails +struct _CajaConnectServerDialogPrivate { CajaApplication *application; @@ -79,7 +79,7 @@ struct _CajaConnectServerDialogDetails gboolean should_destroy; }; -G_DEFINE_TYPE (CajaConnectServerDialog, caja_connect_server_dialog, +G_DEFINE_TYPE_WITH_PRIVATE (CajaConnectServerDialog, caja_connect_server_dialog, GTK_TYPE_DIALOG) static void sensitive_entry_changed_callback (GtkEditable *editable, @@ -851,8 +851,7 @@ caja_connect_server_dialog_init (CajaConnectServerDialog *dialog) gchar *str; int i; - dialog->details = G_TYPE_INSTANCE_GET_PRIVATE (dialog, CAJA_TYPE_CONNECT_SERVER_DIALOG, - CajaConnectServerDialogDetails); + dialog->details = caja_connect_server_dialog_get_instance_private (dialog); content_area = gtk_dialog_get_content_area (GTK_DIALOG (dialog)); @@ -1167,8 +1166,6 @@ caja_connect_server_dialog_class_init (CajaConnectServerDialogClass *class) oclass = G_OBJECT_CLASS (class); oclass->finalize = caja_connect_server_dialog_finalize; - - g_type_class_add_private (class, sizeof (CajaConnectServerDialogDetails)); } GtkWidget * diff --git a/src/caja-connect-server-dialog.h b/src/caja-connect-server-dialog.h index 1876e8a9..2167ed5a 100644 --- a/src/caja-connect-server-dialog.h +++ b/src/caja-connect-server-dialog.h @@ -42,12 +42,12 @@ typedef struct _CajaConnectServerDialog CajaConnectServerDialog; typedef struct _CajaConnectServerDialogClass CajaConnectServerDialogClass; -typedef struct _CajaConnectServerDialogDetails CajaConnectServerDialogDetails; +typedef struct _CajaConnectServerDialogPrivate CajaConnectServerDialogPrivate; struct _CajaConnectServerDialog { GtkDialog parent; - CajaConnectServerDialogDetails *details; + CajaConnectServerDialogPrivate *details; }; struct _CajaConnectServerDialogClass diff --git a/src/caja-navigation-window.c b/src/caja-navigation-window.c index 57d5e425..9bef3cc2 100644 --- a/src/caja-navigation-window.c +++ b/src/caja-navigation-window.c @@ -88,7 +88,7 @@ static void use_extra_mouse_buttons_changed (gpointer static CajaWindowSlot *create_extra_pane (CajaNavigationWindow *window); -G_DEFINE_TYPE (CajaNavigationWindow, caja_navigation_window, CAJA_TYPE_WINDOW) +G_DEFINE_TYPE_WITH_PRIVATE (CajaNavigationWindow, caja_navigation_window, CAJA_TYPE_WINDOW) #define parent_class caja_navigation_window_parent_class static const struct @@ -115,7 +115,7 @@ caja_navigation_window_init (CajaNavigationWindow *window) win = CAJA_WINDOW (window); - window->details = G_TYPE_INSTANCE_GET_PRIVATE (window, CAJA_TYPE_NAVIGATION_WINDOW, CajaNavigationWindowDetails); + window->details = caja_navigation_window_get_instance_private (window); GtkStyleContext *context; @@ -1286,8 +1286,6 @@ caja_navigation_window_class_init (CajaNavigationWindowClass *class) CAJA_WINDOW_CLASS (class)->open_slot = real_open_slot; CAJA_WINDOW_CLASS (class)->close_slot = real_close_slot; - g_type_class_add_private (G_OBJECT_CLASS (class), sizeof (CajaNavigationWindowDetails)); - g_signal_connect_swapped (caja_preferences, "changed::" CAJA_PREFERENCES_MOUSE_BACK_BUTTON, G_CALLBACK(mouse_back_button_changed), diff --git a/src/caja-navigation-window.h b/src/caja-navigation-window.h index 18c713bd..abc2591d 100644 --- a/src/caja-navigation-window.h +++ b/src/caja-navigation-window.h @@ -53,14 +53,14 @@ typedef struct _CajaNavigationWindow CajaNavigationWindow; typedef struct _CajaNavigationWindowClass CajaNavigationWindowClass; -typedef struct _CajaNavigationWindowDetails CajaNavigationWindowDetails; +typedef struct _CajaNavigationWindowPrivate CajaNavigationWindowPrivate; struct _CajaNavigationWindow { CajaWindow parent_object; - CajaNavigationWindowDetails *details; + CajaNavigationWindowPrivate *details; /** UI stuff **/ CajaSidePane *sidebar; diff --git a/src/caja-property-browser.c b/src/caja-property-browser.c index c674a450..f269b6e4 100644 --- a/src/caja-property-browser.c +++ b/src/caja-property-browser.c @@ -66,7 +66,7 @@ typedef enum CAJA_PROPERTY_EMBLEM } CajaPropertyType; -struct CajaPropertyBrowserDetails +struct _CajaPropertyBrowserPrivate { GtkWidget *container; @@ -194,7 +194,7 @@ static GtkTargetEntry drag_types[] = }; -G_DEFINE_TYPE (CajaPropertyBrowser, caja_property_browser, GTK_TYPE_WINDOW) +G_DEFINE_TYPE_WITH_PRIVATE (CajaPropertyBrowser, caja_property_browser, GTK_TYPE_WINDOW) /* Destroy the three dialogs for adding patterns/colors/emblems if any of them @@ -253,8 +253,6 @@ caja_property_browser_class_init (CajaPropertyBrowserClass *klass) widget_class->drag_begin = caja_property_browser_drag_begin; widget_class->drag_data_get = caja_property_browser_drag_data_get; widget_class->drag_end = caja_property_browser_drag_end; - - g_type_class_add_private (klass, sizeof (CajaPropertyBrowserDetails)); } /* initialize the instance's fields, create the necessary subviews, etc. */ @@ -270,9 +268,7 @@ caja_property_browser_init (CajaPropertyBrowser *property_browser) widget = GTK_WIDGET (property_browser); - property_browser->details = G_TYPE_INSTANCE_GET_PRIVATE (property_browser, - CAJA_TYPE_PROPERTY_BROWSER, - CajaPropertyBrowserDetails); + property_browser->details = caja_property_browser_get_instance_private (property_browser); property_browser->details->category = g_strdup ("patterns"); property_browser->details->category_type = CAJA_PROPERTY_PATTERN; diff --git a/src/caja-property-browser.h b/src/caja-property-browser.h index 0ccfe66a..8d3bd4a1 100644 --- a/src/caja-property-browser.h +++ b/src/caja-property-browser.h @@ -49,12 +49,12 @@ typedef struct CajaPropertyBrowserClass CajaPropertyBrowserClass; #define CAJA_PROPERTY_BROWSER_GET_CLASS(obj) \ (G_TYPE_INSTANCE_GET_CLASS ((obj), CAJA_TYPE_PROPERTY_BROWSER, CajaPropertyBrowserClass)) -typedef struct CajaPropertyBrowserDetails CajaPropertyBrowserDetails; +typedef struct _CajaPropertyBrowserPrivate CajaPropertyBrowserPrivate; struct CajaPropertyBrowser { GtkWindow window; - CajaPropertyBrowserDetails *details; + CajaPropertyBrowserPrivate *details; }; struct CajaPropertyBrowserClass diff --git a/src/caja-sidebar-title.c b/src/caja-sidebar-title.c index e13c8549..af9cb932 100644 --- a/src/caja-sidebar-title.c +++ b/src/caja-sidebar-title.c @@ -80,7 +80,7 @@ enum LAST_LABEL_COLOR }; -struct CajaSidebarTitleDetails +struct _CajaSidebarTitlePrivate { CajaFile *file; guint file_changed_connection; @@ -97,7 +97,7 @@ struct CajaSidebarTitleDetails gboolean determined_icon; }; -G_DEFINE_TYPE (CajaSidebarTitle, caja_sidebar_title, GTK_TYPE_BOX) +G_DEFINE_TYPE_WITH_PRIVATE (CajaSidebarTitle, caja_sidebar_title, GTK_TYPE_BOX) static void style_updated (GtkWidget *widget) @@ -116,9 +116,7 @@ style_updated (GtkWidget *widget) static void caja_sidebar_title_init (CajaSidebarTitle *sidebar_title) { - sidebar_title->details = G_TYPE_INSTANCE_GET_PRIVATE (sidebar_title, - CAJA_TYPE_SIDEBAR_TITLE, - CajaSidebarTitleDetails); + sidebar_title->details = caja_sidebar_title_get_instance_private (sidebar_title); gtk_orientable_set_orientation (GTK_ORIENTABLE (sidebar_title), GTK_ORIENTATION_VERTICAL); @@ -220,8 +218,6 @@ caja_sidebar_title_class_init (CajaSidebarTitleClass *klass) "Color used for information text against a light background", GDK_TYPE_RGBA, G_PARAM_READABLE)); - - g_type_class_add_private (klass, sizeof (CajaSidebarTitleDetails)); } /* return a new index title object */ diff --git a/src/caja-sidebar-title.h b/src/caja-sidebar-title.h index d6e651f9..02d56016 100644 --- a/src/caja-sidebar-title.h +++ b/src/caja-sidebar-title.h @@ -45,12 +45,12 @@ #define CAJA_SIDEBAR_TITLE_GET_CLASS(obj) \ (G_TYPE_INSTANCE_GET_CLASS ((obj), CAJA_TYPE_SIDEBAR_TITLE, CajaSidebarTitleClass)) -typedef struct CajaSidebarTitleDetails CajaSidebarTitleDetails; +typedef struct _CajaSidebarTitlePrivate CajaSidebarTitlePrivate; typedef struct { GtkBox box; - CajaSidebarTitleDetails *details; + CajaSidebarTitlePrivate *details; } CajaSidebarTitle; typedef struct diff --git a/src/caja-trash-bar.c b/src/caja-trash-bar.c index 53f9ebcd..8d5535bb 100644 --- a/src/caja-trash-bar.c +++ b/src/caja-trash-bar.c @@ -42,7 +42,7 @@ enum NUM_PROPERTIES }; -struct CajaTrashBarPrivate +struct _CajaTrashBarPrivate { GtkWidget *empty_button; GtkWidget *restore_button; @@ -51,7 +51,7 @@ struct CajaTrashBarPrivate gulong selection_handler_id; }; -G_DEFINE_TYPE (CajaTrashBar, caja_trash_bar, GTK_TYPE_BOX); +G_DEFINE_TYPE_WITH_PRIVATE (CajaTrashBar, caja_trash_bar, GTK_TYPE_BOX); static void restore_button_clicked_cb (GtkWidget *button, @@ -163,8 +163,6 @@ caja_trash_bar_class_init (CajaTrashBarClass *klass) G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY | G_PARAM_STATIC_STRINGS)); - - g_type_class_add_private (klass, sizeof (CajaTrashBarPrivate)); } static void @@ -183,7 +181,7 @@ caja_trash_bar_init (CajaTrashBar *bar) GtkWidget *label; GtkWidget *hbox; - bar->priv = CAJA_TRASH_BAR_GET_PRIVATE (bar); + bar->priv = caja_trash_bar_get_instance_private (bar); hbox = GTK_WIDGET (bar); diff --git a/src/caja-trash-bar.h b/src/caja-trash-bar.h index 5d20175e..7365d9c9 100644 --- a/src/caja-trash-bar.h +++ b/src/caja-trash-bar.h @@ -27,9 +27,7 @@ #include <gtk/gtk.h> -#ifdef __cplusplus -extern "C" { -#endif +G_BEGIN_DECLS #define CAJA_TYPE_TRASH_BAR (caja_trash_bar_get_type ()) #define CAJA_TRASH_BAR(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), CAJA_TYPE_TRASH_BAR, CajaTrashBar)) @@ -38,27 +36,24 @@ extern "C" { #define CAJA_IS_TRASH_BAR_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), CAJA_TYPE_TRASH_BAR)) #define CAJA_TRASH_BAR_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), CAJA_TYPE_TRASH_BAR, CajaTrashBarClass)) - typedef struct CajaTrashBarPrivate CajaTrashBarPrivate; +typedef struct _CajaTrashBarPrivate CajaTrashBarPrivate; - typedef struct - { +typedef struct +{ GtkBox box; CajaTrashBarPrivate *priv; - } CajaTrashBar; +} CajaTrashBar; - typedef struct - { - GtkBoxClass parent_class; +typedef struct +{ +GtkBoxClass parent_class; - } CajaTrashBarClass; +} CajaTrashBarClass; - GType caja_trash_bar_get_type (void) G_GNUC_CONST; +GType caja_trash_bar_get_type (void) G_GNUC_CONST; - GtkWidget *caja_trash_bar_new (CajaWindow *window); +GtkWidget *caja_trash_bar_new (CajaWindow *window); - -#ifdef __cplusplus -} -#endif +G_END_DECLS #endif /* __GS_TRASH_BAR_H */ diff --git a/src/caja-window-private.h b/src/caja-window-private.h index f02e73c8..83cce1df 100644 --- a/src/caja-window-private.h +++ b/src/caja-window-private.h @@ -40,7 +40,7 @@ struct _CajaNavigationWindowPane; /* FIXME bugzilla.gnome.org 42575: Migrate more fields into here. */ -struct CajaWindowDetails +struct _CajaWindowPrivate { GtkWidget *grid; @@ -91,7 +91,7 @@ struct CajaWindowDetails gboolean initiated_unmount; }; -struct _CajaNavigationWindowDetails +struct _CajaNavigationWindowPrivate { GtkWidget *content_paned; GtkWidget *content_box; diff --git a/src/caja-window.c b/src/caja-window.c index a0c1d06a..c584b87a 100644 --- a/src/caja-window.c +++ b/src/caja-window.c @@ -100,6 +100,7 @@ static void action_view_as_callback (GtkAction *action, static GList *history_list; G_DEFINE_TYPE_WITH_CODE (CajaWindow, caja_window, GTK_TYPE_WINDOW, + G_ADD_PRIVATE (CajaWindow) G_IMPLEMENT_INTERFACE (CAJA_TYPE_WINDOW_INFO, caja_window_info_iface_init)); @@ -152,7 +153,7 @@ caja_window_init (CajaWindow *window) } g_object_unref (provider); - window->details = G_TYPE_INSTANCE_GET_PRIVATE (window, CAJA_TYPE_WINDOW, CajaWindowDetails); + window->details = caja_window_get_instance_private (window); window->details->panes = NULL; window->details->active_pane = NULL; @@ -2186,8 +2187,4 @@ caja_window_class_init (CajaWindowClass *class) class->reload = caja_window_reload; class->go_up = caja_window_go_up_signal; - - - - g_type_class_add_private (G_OBJECT_CLASS (class), sizeof (CajaWindowDetails)); } diff --git a/src/caja-window.h b/src/caja-window.h index 7d53ab7a..59410a2c 100644 --- a/src/caja-window.h +++ b/src/caja-window.h @@ -79,7 +79,7 @@ enum CajaWindowOpenSlotFlags CAJA_WINDOW_OPEN_SLOT_APPEND = 1 }; -typedef struct CajaWindowDetails CajaWindowDetails; +typedef struct _CajaWindowPrivate CajaWindowPrivate; typedef struct { @@ -120,7 +120,7 @@ struct CajaWindow { GtkWindow parent_object; - CajaWindowDetails *details; + CajaWindowPrivate *details; CajaApplication *application; }; diff --git a/src/caja-zoom-action.c b/src/caja-zoom-action.c index cd54fee9..50401d59 100644 --- a/src/caja-zoom-action.c +++ b/src/caja-zoom-action.c @@ -33,16 +33,12 @@ #include <gtk/gtk.h> #include <eel/eel-gtk-extensions.h> -G_DEFINE_TYPE (CajaZoomAction, caja_zoom_action, GTK_TYPE_ACTION) - static void caja_zoom_action_init (CajaZoomAction *action); static void caja_zoom_action_class_init (CajaZoomActionClass *class); static GObjectClass *parent_class = NULL; -#define CAJA_ZOOM_ACTION_GET_PRIVATE(object)(G_TYPE_INSTANCE_GET_PRIVATE ((object), CAJA_TYPE_ZOOM_ACTION, CajaZoomActionPrivate)) - -struct CajaZoomActionPrivate +struct _CajaZoomActionPrivate { CajaNavigationWindow *window; }; @@ -53,6 +49,8 @@ enum PROP_WINDOW }; +G_DEFINE_TYPE_WITH_PRIVATE (CajaZoomAction, caja_zoom_action, GTK_TYPE_ACTION) + static void zoom_changed_callback (CajaWindow *window, CajaZoomLevel zoom_level, @@ -199,12 +197,10 @@ caja_zoom_action_class_init (CajaZoomActionClass *class) "The navigation window", G_TYPE_OBJECT, G_PARAM_READWRITE)); - - g_type_class_add_private (object_class, sizeof(CajaZoomActionPrivate)); } static void caja_zoom_action_init (CajaZoomAction *action) { - action->priv = CAJA_ZOOM_ACTION_GET_PRIVATE (action); + action->priv = caja_zoom_action_get_instance_private (action); } diff --git a/src/caja-zoom-action.h b/src/caja-zoom-action.h index 2e3c182d..355e8eb5 100644 --- a/src/caja-zoom-action.h +++ b/src/caja-zoom-action.h @@ -37,7 +37,7 @@ typedef struct _CajaZoomAction CajaZoomAction; typedef struct _CajaZoomActionClass CajaZoomActionClass; -typedef struct CajaZoomActionPrivate CajaZoomActionPrivate; +typedef struct _CajaZoomActionPrivate CajaZoomActionPrivate; struct _CajaZoomAction { diff --git a/src/caja-zoom-control.c b/src/caja-zoom-control.c index f875c42a..080e703d 100644 --- a/src/caja-zoom-control.c +++ b/src/caja-zoom-control.c @@ -55,7 +55,7 @@ enum LAST_SIGNAL }; -struct CajaZoomControlDetails +struct _CajaZoomControlPrivate { GtkWidget *zoom_in; GtkWidget *zoom_out; @@ -107,7 +107,7 @@ static GType caja_zoom_control_accessible_get_type (void); #define NUM_ACTIONS ((int)G_N_ELEMENTS (caja_zoom_control_accessible_action_names)) -G_DEFINE_TYPE (CajaZoomControl, caja_zoom_control, GTK_TYPE_BOX); +G_DEFINE_TYPE_WITH_PRIVATE (CajaZoomControl, caja_zoom_control, GTK_TYPE_BOX); static void caja_zoom_control_finalize (GObject *object) @@ -230,7 +230,7 @@ caja_zoom_control_init (CajaZoomControl *zoom_control) GtkWidget *image; int i; - zoom_control->details = G_TYPE_INSTANCE_GET_PRIVATE (zoom_control, CAJA_TYPE_ZOOM_CONTROL, CajaZoomControlDetails); + zoom_control->details = caja_zoom_control_get_instance_private (zoom_control); zoom_control->details->zoom_level = CAJA_ZOOM_LEVEL_STANDARD; zoom_control->details->min_zoom_level = CAJA_ZOOM_LEVEL_SMALLEST; @@ -677,8 +677,6 @@ caja_zoom_control_class_init (CajaZoomControlClass *class) "change_value", 1, GTK_TYPE_SCROLL_TYPE, GTK_SCROLL_STEP_UP); - - g_type_class_add_private (G_OBJECT_CLASS (class), sizeof (CajaZoomControlDetails)); } static gboolean diff --git a/src/caja-zoom-control.h b/src/caja-zoom-control.h index 85a07046..f5aec1ea 100644 --- a/src/caja-zoom-control.h +++ b/src/caja-zoom-control.h @@ -45,12 +45,12 @@ typedef struct CajaZoomControl CajaZoomControl; typedef struct CajaZoomControlClass CajaZoomControlClass; -typedef struct CajaZoomControlDetails CajaZoomControlDetails; +typedef struct _CajaZoomControlPrivate CajaZoomControlPrivate; struct CajaZoomControl { GtkBox parent; - CajaZoomControlDetails *details; + CajaZoomControlPrivate *details; }; struct CajaZoomControlClass diff --git a/src/file-manager/fm-desktop-icon-view.c b/src/file-manager/fm-desktop-icon-view.c index f6b563c3..01060fe5 100644 --- a/src/file-manager/fm-desktop-icon-view.c +++ b/src/file-manager/fm-desktop-icon-view.c @@ -62,7 +62,7 @@ /* Timeout to check the desktop directory for updates */ #define RESCAN_TIMEOUT 4 -struct FMDesktopIconViewDetails +struct _FMDesktopIconViewPrivate { GdkWindow *root_window; GtkActionGroup *desktop_action_group; @@ -86,7 +86,7 @@ static gboolean real_supports_zooming (FMDirectoryVi static void fm_desktop_icon_view_update_icon_container_fonts (FMDesktopIconView *view); static void font_changed_callback (gpointer callback_data); -G_DEFINE_TYPE (FMDesktopIconView, fm_desktop_icon_view, FM_TYPE_ICON_VIEW) +G_DEFINE_TYPE_WITH_PRIVATE (FMDesktopIconView, fm_desktop_icon_view, FM_TYPE_ICON_VIEW) static char *desktop_directory; static time_t desktop_dir_modify_time; @@ -267,18 +267,18 @@ fm_desktop_icon_view_dispose (GObject *object) icon_view = FM_DESKTOP_ICON_VIEW (object); /* Remove desktop rescan timeout. */ - if (icon_view->details->reload_desktop_timeout != 0) + if (icon_view->priv->reload_desktop_timeout != 0) { - g_source_remove (icon_view->details->reload_desktop_timeout); - icon_view->details->reload_desktop_timeout = 0; + g_source_remove (icon_view->priv->reload_desktop_timeout); + icon_view->priv->reload_desktop_timeout = 0; } ui_manager = fm_directory_view_get_ui_manager (FM_DIRECTORY_VIEW (icon_view)); if (ui_manager != NULL) { caja_ui_unmerge_ui (ui_manager, - &icon_view->details->desktop_merge_id, - &icon_view->details->desktop_action_group); + &icon_view->priv->desktop_merge_id, + &icon_view->priv->desktop_action_group); } g_signal_handlers_disconnect_by_func (caja_icon_view_preferences, @@ -311,8 +311,6 @@ fm_desktop_icon_view_class_init (FMDesktopIconViewClass *class) FM_ICON_VIEW_CLASS (class)->supports_scaling = real_supports_scaling; FM_ICON_VIEW_CLASS (class)->supports_keep_aligned = real_supports_keep_aligned; FM_ICON_VIEW_CLASS (class)->supports_labels_beside_icons = real_supports_labels_beside_icons; - - g_type_class_add_private (class, sizeof (FMDesktopIconViewDetails)); } static void @@ -381,13 +379,13 @@ fm_desktop_icon_view_handle_middle_click (CajaIconContainer *icon_container, static void unrealized_callback (GtkWidget *widget, FMDesktopIconView *desktop_icon_view) { - g_return_if_fail (desktop_icon_view->details->root_window != NULL); + g_return_if_fail (desktop_icon_view->priv->root_window != NULL); /* Remove the property filter */ - gdk_window_remove_filter (desktop_icon_view->details->root_window, + gdk_window_remove_filter (desktop_icon_view->priv->root_window, desktop_icon_view_property_filter, desktop_icon_view); - desktop_icon_view->details->root_window = NULL; + desktop_icon_view->priv->root_window = NULL; } static void @@ -398,7 +396,7 @@ realized_callback (GtkWidget *widget, FMDesktopIconView *desktop_icon_view) GtkAllocation allocation; gint scale; - g_return_if_fail (desktop_icon_view->details->root_window == NULL); + g_return_if_fail (desktop_icon_view->priv->root_window == NULL); screen = gtk_widget_get_screen (widget); scale = gtk_widget_get_scale_factor (widget); @@ -418,7 +416,7 @@ realized_callback (GtkWidget *widget, FMDesktopIconView *desktop_icon_view) root_window = gdk_screen_get_root_window (screen); - desktop_icon_view->details->root_window = root_window; + desktop_icon_view->priv->root_window = root_window; /* Read out the workarea geometry and update the icon container accordingly */ net_workarea_changed (desktop_icon_view, root_window); @@ -468,7 +466,7 @@ do_desktop_rescan (gpointer data) struct stat buf; desktop_icon_view = FM_DESKTOP_ICON_VIEW (data); - if (desktop_icon_view->details->pending_rescan) + if (desktop_icon_view->priv->pending_rescan) { return TRUE; } @@ -483,7 +481,7 @@ do_desktop_rescan (gpointer data) return TRUE; } - desktop_icon_view->details->pending_rescan = TRUE; + desktop_icon_view->priv->pending_rescan = TRUE; caja_directory_force_reload ( fm_directory_view_get_model ( @@ -497,7 +495,7 @@ done_loading (CajaDirectory *model, { struct stat buf; - desktop_icon_view->details->pending_rescan = FALSE; + desktop_icon_view->priv->pending_rescan = FALSE; if (stat (desktop_directory, &buf) == -1) { return; @@ -519,13 +517,13 @@ delayed_init (FMDesktopIconView *desktop_icon_view) G_CALLBACK (done_loading), desktop_icon_view, 0); /* Monitor desktop directory. */ - desktop_icon_view->details->reload_desktop_timeout = + desktop_icon_view->priv->reload_desktop_timeout = g_timeout_add_seconds (RESCAN_TIMEOUT, do_desktop_rescan, desktop_icon_view); g_signal_handler_disconnect (desktop_icon_view, - desktop_icon_view->details->delayed_init_signal); + desktop_icon_view->priv->delayed_init_signal); - desktop_icon_view->details->delayed_init_signal = 0; + desktop_icon_view->priv->delayed_init_signal = 0; } static void @@ -559,9 +557,7 @@ fm_desktop_icon_view_init (FMDesktopIconView *desktop_icon_view) GtkAllocation allocation; GtkAdjustment *hadj, *vadj; - desktop_icon_view->details = G_TYPE_INSTANCE_GET_PRIVATE (desktop_icon_view, - FM_TYPE_DESKTOP_ICON_VIEW, - FMDesktopIconViewDetails); + desktop_icon_view->priv = fm_desktop_icon_view_get_instance_private (desktop_icon_view); if (desktop_directory == NULL) { @@ -581,7 +577,7 @@ fm_desktop_icon_view_init (FMDesktopIconView *desktop_icon_view) */ if (!caja_monitor_active ()) { - desktop_icon_view->details->delayed_init_signal = g_signal_connect_object + desktop_icon_view->priv->delayed_init_signal = g_signal_connect_object (desktop_icon_view, "begin_loading", G_CALLBACK (delayed_init), desktop_icon_view, 0); } @@ -737,14 +733,14 @@ real_update_menus (FMDirectoryView *view) /* New Launcher */ disable_command_line = g_settings_get_boolean (mate_lockdown_preferences, CAJA_PREFERENCES_LOCKDOWN_COMMAND_LINE); - action = gtk_action_group_get_action (desktop_view->details->desktop_action_group, + action = gtk_action_group_get_action (desktop_view->priv->desktop_action_group, FM_ACTION_NEW_LAUNCHER_DESKTOP); gtk_action_set_visible (action, !disable_command_line); /* Empty Trash */ include_empty_trash = trash_link_is_selection (view); - action = gtk_action_group_get_action (desktop_view->details->desktop_action_group, + action = gtk_action_group_get_action (desktop_view->priv->desktop_action_group, FM_ACTION_EMPTY_TRASH_CONDITIONAL); gtk_action_set_visible (action, include_empty_trash); @@ -805,7 +801,7 @@ real_merge_menus (FMDirectoryView *view) action_group = gtk_action_group_new ("DesktopViewActions"); gtk_action_group_set_translation_domain (action_group, GETTEXT_PACKAGE); - desktop_view->details->desktop_action_group = action_group; + desktop_view->priv->desktop_action_group = action_group; gtk_action_group_add_actions (action_group, desktop_view_entries, G_N_ELEMENTS (desktop_view_entries), view); @@ -814,7 +810,7 @@ real_merge_menus (FMDirectoryView *view) g_object_unref (action_group); /* owned by ui manager */ ui = caja_ui_string_get ("caja-desktop-icon-view-ui.xml"); - desktop_view->details->desktop_merge_id = + desktop_view->priv->desktop_merge_id = gtk_ui_manager_add_ui_from_string (ui_manager, ui, -1, NULL); } diff --git a/src/file-manager/fm-desktop-icon-view.h b/src/file-manager/fm-desktop-icon-view.h index f0ed0f1f..c29d125d 100644 --- a/src/file-manager/fm-desktop-icon-view.h +++ b/src/file-manager/fm-desktop-icon-view.h @@ -41,11 +41,11 @@ #define FM_DESKTOP_ICON_VIEW_ID "OAFIID:Caja_File_Manager_Desktop_Icon_View" -typedef struct FMDesktopIconViewDetails FMDesktopIconViewDetails; +typedef struct _FMDesktopIconViewPrivate FMDesktopIconViewPrivate; typedef struct { FMIconView parent; - FMDesktopIconViewDetails *details; + FMDesktopIconViewPrivate *priv; } FMDesktopIconView; typedef struct diff --git a/src/file-manager/fm-properties-window.c b/src/file-manager/fm-properties-window.c index 90d97717..7eafb9a5 100644 --- a/src/file-manager/fm-properties-window.c +++ b/src/file-manager/fm-properties-window.c @@ -83,7 +83,7 @@ static GHashTable *windows; static GHashTable *pending_lists; -struct FMPropertiesWindowDetails { +struct _FMPropertiesWindowPrivate { GList *original_files; GList *target_files; @@ -231,7 +231,7 @@ static GtkLabel *attach_ellipsizing_value_label (GtkGrid *grid, static GtkWidget* create_pie_widget (FMPropertiesWindow *window); -G_DEFINE_TYPE (FMPropertiesWindow, fm_properties_window, GTK_TYPE_DIALOG); +G_DEFINE_TYPE_WITH_PRIVATE (FMPropertiesWindow, fm_properties_window, GTK_TYPE_DIALOG); static gboolean is_multi_file_window (FMPropertiesWindow *window) @@ -5762,14 +5762,10 @@ fm_properties_window_class_init (FMPropertiesWindowClass *class) binding_set = gtk_binding_set_by_class (class); gtk_binding_entry_add_signal (binding_set, GDK_KEY_Escape, 0, "close", 0); - - g_type_class_add_private (class, sizeof (FMPropertiesWindowDetails)); } static void fm_properties_window_init (FMPropertiesWindow *window) { - window->details = G_TYPE_INSTANCE_GET_PRIVATE (window, FM_TYPE_PROPERTIES_WINDOW, - FMPropertiesWindowDetails); - + window->details = fm_properties_window_get_instance_private (window); } diff --git a/src/file-manager/fm-properties-window.h b/src/file-manager/fm-properties-window.h index 38eb0e15..860b76bb 100644 --- a/src/file-manager/fm-properties-window.h +++ b/src/file-manager/fm-properties-window.h @@ -43,12 +43,12 @@ typedef struct FMPropertiesWindow FMPropertiesWindow; #define FM_PROPERTIES_WINDOW_GET_CLASS(obj) \ (G_TYPE_INSTANCE_GET_CLASS ((obj), FM_TYPE_PROPERTIES_WINDOW, FMPropertiesWindowClass)) -typedef struct FMPropertiesWindowDetails FMPropertiesWindowDetails; +typedef struct _FMPropertiesWindowPrivate FMPropertiesWindowPrivate; struct FMPropertiesWindow { GtkDialog window; - FMPropertiesWindowDetails *details; + FMPropertiesWindowPrivate *details; }; struct FMPropertiesWindowClass |