diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/eom-image.c | 8 | ||||
-rw-r--r-- | src/eom-jobs.c | 10 | ||||
-rw-r--r-- | src/eom-preferences-dialog.c | 18 | ||||
-rw-r--r-- | src/eom-print-image-setup.c | 63 | ||||
-rw-r--r-- | src/eom-print-preview.c | 37 | ||||
-rw-r--r-- | src/eom-save-as-dialog-helper.c | 20 | ||||
-rw-r--r-- | src/eom-scroll-view.c | 113 | ||||
-rw-r--r-- | src/eom-sidebar.c | 26 | ||||
-rw-r--r-- | src/eom-thumb-view.c | 66 | ||||
-rw-r--r-- | src/eom-window.c | 400 |
10 files changed, 393 insertions, 368 deletions
diff --git a/src/eom-image.c b/src/eom-image.c index 36f6ff2..cbcf126 100644 --- a/src/eom-image.c +++ b/src/eom-image.c @@ -980,8 +980,7 @@ eom_image_real_load (EomImage *img, loader = gdk_pixbuf_loader_new (); } - g_signal_connect_object (G_OBJECT (loader), - "size-prepared", + g_signal_connect_object (loader, "size-prepared", G_CALLBACK (eom_image_size_prepared), img, 0); @@ -1457,8 +1456,7 @@ transfer_progress_cb (goffset cur_bytes, EomImage *image = EOM_IMAGE (user_data); if (cur_bytes > 0) { - g_signal_emit (G_OBJECT(image), - signals[SIGNAL_SAVE_PROGRESS], + g_signal_emit (image, signals[SIGNAL_SAVE_PROGRESS], 0, (gfloat) cur_bytes / (gfloat) total_bytes); } @@ -2110,7 +2108,7 @@ eom_image_modified (EomImage *img) { g_return_if_fail (EOM_IS_IMAGE (img)); - g_signal_emit (G_OBJECT (img), signals[SIGNAL_CHANGED], 0); + g_signal_emit (img, signals[SIGNAL_CHANGED], 0); } gchar* diff --git a/src/eom-jobs.c b/src/eom-jobs.c index c78b707..bde2517 100644 --- a/src/eom-jobs.c +++ b/src/eom-jobs.c @@ -651,8 +651,7 @@ eom_job_save_run (EomJob *ejob) } } - handler_id = g_signal_connect (G_OBJECT (image), - "save-progress", + handler_id = g_signal_connect (image, "save-progress", G_CALLBACK (save_progress_handler), job); @@ -666,7 +665,7 @@ eom_job_save_run (EomJob *ejob) g_object_unref (save_info); if (handler_id != 0) - g_signal_handler_disconnect (G_OBJECT (image), handler_id); + g_signal_handler_disconnect (image, handler_id); eom_image_data_unref (image); @@ -782,8 +781,7 @@ eom_job_save_as_run (EomJob *ejob) g_assert (ejob->error == NULL); - handler_id = g_signal_connect (G_OBJECT (image), - "save-progress", + handler_id = g_signal_connect (image, "save-progress", G_CALLBACK (save_progress_handler), job); @@ -829,7 +827,7 @@ eom_job_save_as_run (EomJob *ejob) g_object_unref (dest_info); if (handler_id != 0) - g_signal_handler_disconnect (G_OBJECT (image), handler_id); + g_signal_handler_disconnect (image, handler_id); eom_image_data_unref (image); diff --git a/src/eom-preferences-dialog.c b/src/eom-preferences-dialog.c index ea3a65d..fb2aae5 100644 --- a/src/eom-preferences-dialog.c +++ b/src/eom-preferences-dialog.c @@ -213,8 +213,7 @@ eom_preferences_dialog_init (EomPreferencesDialog *pref_dlg) priv->view_settings = g_settings_new (EOM_CONF_VIEW); priv->fullscreen_settings = g_settings_new (EOM_CONF_FULLSCREEN); - g_signal_connect (G_OBJECT (pref_dlg), - "response", + g_signal_connect (pref_dlg, "response", G_CALLBACK (eom_preferences_response_cb), pref_dlg); @@ -246,8 +245,7 @@ eom_preferences_dialog_init (EomPreferencesDialog *pref_dlg) GSETTINGS_OBJECT_VALUE, GINT_TO_POINTER (EOM_TRANSP_COLOR)); - g_signal_connect (G_OBJECT (priv->color_radio), - "toggled", + g_signal_connect (priv->color_radio, "toggled", G_CALLBACK (pd_transp_radio_toggle_cb), priv->view_settings); @@ -255,8 +253,7 @@ eom_preferences_dialog_init (EomPreferencesDialog *pref_dlg) GSETTINGS_OBJECT_VALUE, GINT_TO_POINTER (EOM_TRANSP_CHECKED)); - g_signal_connect (G_OBJECT (priv->checkpattern_radio), - "toggled", + g_signal_connect (priv->checkpattern_radio, "toggled", G_CALLBACK (pd_transp_radio_toggle_cb), priv->view_settings); @@ -264,8 +261,7 @@ eom_preferences_dialog_init (EomPreferencesDialog *pref_dlg) GSETTINGS_OBJECT_VALUE, GINT_TO_POINTER (EOM_TRANSP_BACKGROUND)); - g_signal_connect (G_OBJECT (priv->background_radio), - "toggled", + g_signal_connect (priv->background_radio, "toggled", G_CALLBACK (pd_transp_radio_toggle_cb), priv->view_settings); @@ -307,8 +303,7 @@ eom_preferences_dialog_init (EomPreferencesDialog *pref_dlg) EOM_CONF_FULLSCREEN_RANDOM, priv->random_check, "active", G_SETTINGS_BIND_DEFAULT); - g_signal_connect (priv->fullscreen_settings, - "changed::" EOM_CONF_FULLSCREEN_RANDOM, + g_signal_connect (priv->fullscreen_settings, "changed::" EOM_CONF_FULLSCREEN_RANDOM, G_CALLBACK (random_change_cb), priv->loop_check); random_change_cb (priv->fullscreen_settings, @@ -324,8 +319,7 @@ eom_preferences_dialog_init (EomPreferencesDialog *pref_dlg) /* Add tab scrolling support for GTK3 */ gtk_widget_add_events (priv->notebook, GDK_SCROLL_MASK); - g_signal_connect (priv->notebook, - "scroll-event", + g_signal_connect (priv->notebook, "scroll-event", G_CALLBACK (eom_notebook_scroll_event_cb), NULL); } diff --git a/src/eom-print-image-setup.c b/src/eom-print-image-setup.c index 588e72c..2fde257 100644 --- a/src/eom-print-image-setup.c +++ b/src/eom-print-image-setup.c @@ -791,24 +791,41 @@ connect_signals (EomPrintImageSetup *setup) priv = setup->priv; - g_signal_connect (G_OBJECT (priv->left), "value-changed", - G_CALLBACK (on_left_value_changed), setup); - g_signal_connect (G_OBJECT (priv->right), "value-changed", - G_CALLBACK (on_right_value_changed), setup); - g_signal_connect (G_OBJECT (priv->top), "value-changed", - G_CALLBACK (on_top_value_changed), setup); - g_signal_connect (G_OBJECT (priv->bottom), "value-changed", - G_CALLBACK (on_bottom_value_changed), setup); - g_signal_connect (G_OBJECT (priv->width), "value-changed", - G_CALLBACK (on_width_value_changed), setup); - g_signal_connect (G_OBJECT (priv->height), "value-changed", - G_CALLBACK (on_height_value_changed), setup); - g_signal_connect (G_OBJECT (priv->scaling), "value-changed", - G_CALLBACK (on_scale_changed), setup); - g_signal_connect (G_OBJECT (priv->scaling), "format-value", - G_CALLBACK (on_scale_format_value), NULL); - g_signal_connect (G_OBJECT (priv->preview), "image-moved", - G_CALLBACK (on_preview_image_moved), setup); + g_signal_connect (priv->left, "value-changed", + G_CALLBACK (on_left_value_changed), + setup); + + g_signal_connect (priv->right, "value-changed", + G_CALLBACK (on_right_value_changed), + setup); + + g_signal_connect (priv->top, "value-changed", + G_CALLBACK (on_top_value_changed), + setup); + + g_signal_connect (priv->bottom, "value-changed", + G_CALLBACK (on_bottom_value_changed), + setup); + + g_signal_connect (priv->width, "value-changed", + G_CALLBACK (on_width_value_changed), + setup); + + g_signal_connect (priv->height, "value-changed", + G_CALLBACK (on_height_value_changed), + setup); + + g_signal_connect (priv->scaling, "value-changed", + G_CALLBACK (on_scale_changed), + setup); + + g_signal_connect (priv->scaling, "format-value", + G_CALLBACK (on_scale_format_value), + NULL); + + g_signal_connect (priv->preview, "image-moved", + G_CALLBACK (on_preview_image_moved), + setup); } static void @@ -887,8 +904,9 @@ eom_print_image_setup_init (EomPrintImageSetup *setup) 1, 1); gtk_label_set_mnemonic_widget (GTK_LABEL (label), combobox); priv->center = combobox; - g_signal_connect (G_OBJECT (combobox), "changed", - G_CALLBACK (on_center_changed), setup); + g_signal_connect (combobox, "changed", + G_CALLBACK (on_center_changed), + setup); grid = gtk_grid_new (); gtk_grid_set_row_spacing (GTK_GRID (grid), 6); @@ -939,8 +957,9 @@ eom_print_image_setup_init (EomPrintImageSetup *setup) 1, 1); gtk_label_set_mnemonic_widget (GTK_LABEL (label), combobox); priv->unit = combobox; - g_signal_connect (G_OBJECT (combobox), "changed", - G_CALLBACK (on_unit_changed), setup); + g_signal_connect (combobox, "changed", + G_CALLBACK (on_unit_changed), + setup); priv->preview = eom_print_preview_new (); diff --git a/src/eom-print-preview.c b/src/eom-print-preview.c index 47ff4a7..f0b85bf 100644 --- a/src/eom-print-preview.c +++ b/src/eom-print-preview.c @@ -521,24 +521,29 @@ eom_print_preview_new (void) /* update_relative_sizes (preview); */ - g_signal_connect (G_OBJECT (area), - "draw", G_CALLBACK (draw_cb), - preview); + g_signal_connect (area, "draw", + G_CALLBACK (draw_cb), + preview); - g_signal_connect (G_OBJECT (area), "motion-notify-event", - G_CALLBACK (motion_notify_event_cb), preview); + g_signal_connect (area, "motion-notify-event", + G_CALLBACK (motion_notify_event_cb), + preview); - g_signal_connect (G_OBJECT (area), "button-press-event", - G_CALLBACK (button_press_event_cb), preview); + g_signal_connect (area, "button-press-event", + G_CALLBACK (button_press_event_cb), + preview); - g_signal_connect (G_OBJECT (area), "button-release-event", - G_CALLBACK (button_release_event_cb), preview); + g_signal_connect (area, "button-release-event", + G_CALLBACK (button_release_event_cb), + preview); - g_signal_connect (G_OBJECT (area), "key-press-event", - G_CALLBACK (key_press_event_cb), preview); + g_signal_connect (area, "key-press-event", + G_CALLBACK (key_press_event_cb), + preview); g_signal_connect (area, "size-allocate", - G_CALLBACK (size_allocate_cb), preview); + G_CALLBACK (size_allocate_cb), + preview); return GTK_WIDGET (preview); } @@ -796,9 +801,7 @@ key_press_event_cb (GtkWidget *widget, NULL); stop_emission = TRUE; - g_signal_emit (G_OBJECT (user_data), - preview_signals - [SIGNAL_IMAGE_MOVED], 0); + g_signal_emit (user_data, preview_signals[SIGNAL_IMAGE_MOVED], 0); } return stop_emission; @@ -845,9 +848,7 @@ motion_notify_event_cb (GtkWidget *widget, priv->cursorx = event->x; priv->cursory = event->y; - g_signal_emit (G_OBJECT (user_data), - preview_signals - [SIGNAL_IMAGE_MOVED], 0); + g_signal_emit (user_data, preview_signals[SIGNAL_IMAGE_MOVED], 0); } else { if (press_inside_image_area (EOM_PRINT_PREVIEW (user_data), event->x, event->y)) { GdkCursor *cursor; diff --git a/src/eom-save-as-dialog-helper.c b/src/eom-save-as-dialog-helper.c index 090b556..537243f 100644 --- a/src/eom-save-as-dialog-helper.c +++ b/src/eom-save-as-dialog-helper.c @@ -236,17 +236,21 @@ eom_save_as_dialog_new (GtkWindow *main, GList *images, GFile *base_file) data->image = g_object_ref (EOM_IMAGE (g_list_nth_data (images, data->nth_image))); g_object_set_data_full (G_OBJECT (dlg), "data", data, destroy_data_cb); - g_signal_connect (G_OBJECT (data->format_combobox), "changed", - (GCallback) on_format_combobox_changed, dlg); + g_signal_connect (data->format_combobox, "changed", + G_CALLBACK (on_format_combobox_changed), + dlg); - g_signal_connect (G_OBJECT (data->token_entry), "changed", - (GCallback) on_token_entry_changed, dlg); + g_signal_connect (data->token_entry, "changed", + G_CALLBACK (on_token_entry_changed), + dlg); - g_signal_connect (G_OBJECT (data->replace_spaces_check), "toggled", - (GCallback) on_replace_spaces_check_clicked, dlg); + g_signal_connect (data->replace_spaces_check, "toggled", + G_CALLBACK (on_replace_spaces_check_clicked), + dlg); - g_signal_connect (G_OBJECT (data->counter_spin), "changed", - (GCallback) on_counter_spin_changed, dlg); + g_signal_connect (data->counter_spin, "changed", + G_CALLBACK (on_counter_spin_changed), + dlg); label = GTK_WIDGET (gtk_builder_get_object (xml, "preview_label_from")); gtk_label_set_text (GTK_LABEL (label), eom_image_get_caption (data->image)); diff --git a/src/eom-scroll-view.c b/src/eom-scroll-view.c index 1149915..f35e022 100644 --- a/src/eom-scroll-view.c +++ b/src/eom-scroll-view.c @@ -189,12 +189,12 @@ free_image_resources (EomScrollView *view) priv = view->priv; if (priv->image_changed_id > 0) { - g_signal_handler_disconnect (G_OBJECT (priv->image), priv->image_changed_id); + g_signal_handler_disconnect (priv->image, priv->image_changed_id); priv->image_changed_id = 0; } if (priv->frame_changed_id > 0) { - g_signal_handler_disconnect (G_OBJECT (priv->image), priv->frame_changed_id); + g_signal_handler_disconnect (priv->image, priv->frame_changed_id); priv->frame_changed_id = 0; } @@ -762,7 +762,7 @@ set_zoom (EomScrollView *view, double zoom, /* repaint the whole image */ gtk_widget_queue_draw (priv->display); - g_signal_emit (view, view_signals [SIGNAL_ZOOM_CHANGED], 0, priv->zoom); + g_signal_emit (view, view_signals[SIGNAL_ZOOM_CHANGED], 0, priv->zoom); } /* Zooms the image to fit the available allocation */ @@ -799,7 +799,7 @@ set_zoom_fit (EomScrollView *view) priv->xofs = 0; priv->yofs = 0; - g_signal_emit (view, view_signals [SIGNAL_ZOOM_CHANGED], 0, priv->zoom); + g_signal_emit (view, view_signals[SIGNAL_ZOOM_CHANGED], 0, priv->zoom); } /*=================================== @@ -1161,19 +1161,19 @@ display_size_change (GtkWidget *widget, GdkEventConfigure *event, gpointer data) static gboolean eom_scroll_view_focus_in_event (GtkWidget *widget, - GdkEventFocus *event, - gpointer data) + GdkEventFocus *event, + gpointer data) { - g_signal_stop_emission_by_name (G_OBJECT (widget), "focus_in_event"); + g_signal_stop_emission_by_name (widget, "focus_in_event"); return FALSE; } static gboolean eom_scroll_view_focus_out_event (GtkWidget *widget, - GdkEventFocus *event, - gpointer data) + GdkEventFocus *event, + gpointer data) { - g_signal_stop_emission_by_name (G_OBJECT (widget), "focus_out_event"); + g_signal_stop_emission_by_name (widget, "focus_out_event"); return FALSE; } @@ -1712,11 +1712,13 @@ eom_scroll_view_set_image (EomScrollView *view, EomImage *image) } priv->image_changed_id = g_signal_connect (image, "changed", - (GCallback) image_changed_cb, view); + G_CALLBACK (image_changed_cb), + view); if (eom_image_is_animation (image) == TRUE ) { eom_image_start_animation (image); priv->frame_changed_id = g_signal_connect (image, "next-frame", - (GCallback) display_next_frame_cb, view); + G_CALLBACK (display_next_frame_cb), + view); } } @@ -1827,14 +1829,14 @@ eom_scroll_view_init (EomScrollView *view) priv->hadj = GTK_ADJUSTMENT (gtk_adjustment_new (0, 100, 0, 10, 10, 100)); g_signal_connect (priv->hadj, "value_changed", - G_CALLBACK (adjustment_changed_cb), - view); + G_CALLBACK (adjustment_changed_cb), + view); priv->hbar = gtk_scrollbar_new (GTK_ORIENTATION_HORIZONTAL, priv->hadj); priv->vadj = GTK_ADJUSTMENT (gtk_adjustment_new (0, 100, 0, 10, 10, 100)); g_signal_connect (priv->vadj, "value_changed", - G_CALLBACK (adjustment_changed_cb), - view); + G_CALLBACK (adjustment_changed_cb), + view); priv->vbar = gtk_scrollbar_new (GTK_ORIENTATION_VERTICAL, priv->vadj); priv->display = g_object_new (GTK_TYPE_DRAWING_AREA, @@ -1850,37 +1852,59 @@ eom_scroll_view_init (EomScrollView *view) | GDK_POINTER_MOTION_HINT_MASK | GDK_SCROLL_MASK | GDK_KEY_PRESS_MASK); - g_signal_connect (G_OBJECT (priv->display), "configure_event", - G_CALLBACK (display_size_change), view); - g_signal_connect (G_OBJECT (priv->display), "draw", G_CALLBACK (display_draw), view); - g_signal_connect (G_OBJECT (priv->display), "map_event", - G_CALLBACK (display_map_event), view); - g_signal_connect (G_OBJECT (priv->display), "button_press_event", - G_CALLBACK (eom_scroll_view_button_press_event), - view); - g_signal_connect (G_OBJECT (priv->display), "motion_notify_event", - G_CALLBACK (eom_scroll_view_motion_event), view); - g_signal_connect (G_OBJECT (priv->display), "button_release_event", - G_CALLBACK (eom_scroll_view_button_release_event), - view); - g_signal_connect (G_OBJECT (priv->display), "scroll_event", - G_CALLBACK (eom_scroll_view_scroll_event), view); - g_signal_connect (G_OBJECT (priv->display), "focus_in_event", - G_CALLBACK (eom_scroll_view_focus_in_event), NULL); - g_signal_connect (G_OBJECT (priv->display), "focus_out_event", - G_CALLBACK (eom_scroll_view_focus_out_event), NULL); - - g_signal_connect (G_OBJECT (view), "key_press_event", - G_CALLBACK (display_key_press_event), view); + + g_signal_connect (priv->display, "configure_event", + G_CALLBACK (display_size_change), + view); + + g_signal_connect (priv->display, "draw", + G_CALLBACK (display_draw), + view); + + g_signal_connect (priv->display, "map_event", + G_CALLBACK (display_map_event), + view); + + g_signal_connect (priv->display, "button_press_event", + G_CALLBACK (eom_scroll_view_button_press_event), + view); + + g_signal_connect (priv->display, "motion_notify_event", + G_CALLBACK (eom_scroll_view_motion_event), + view); + + g_signal_connect (priv->display, "button_release_event", + G_CALLBACK (eom_scroll_view_button_release_event), + view); + + g_signal_connect (priv->display, "scroll_event", + G_CALLBACK (eom_scroll_view_scroll_event), + view); + + g_signal_connect (priv->display, "focus_in_event", + G_CALLBACK (eom_scroll_view_focus_in_event), + NULL); + + g_signal_connect (priv->display, "focus_out_event", + G_CALLBACK (eom_scroll_view_focus_out_event), + NULL); + + g_signal_connect (view, "key_press_event", + G_CALLBACK (display_key_press_event), + view); gtk_drag_source_set (priv->display, GDK_BUTTON1_MASK, target_table, G_N_ELEMENTS (target_table), GDK_ACTION_COPY | GDK_ACTION_MOVE | GDK_ACTION_LINK | GDK_ACTION_ASK); - g_signal_connect (G_OBJECT (priv->display), "drag-data-get", - G_CALLBACK (view_on_drag_data_get_cb), view); - g_signal_connect (G_OBJECT (priv->display), "drag-begin", - G_CALLBACK (view_on_drag_begin_cb), view); + + g_signal_connect (priv->display, "drag-data-get", + G_CALLBACK (view_on_drag_data_get_cb), + view); + + g_signal_connect (priv->display, "drag-begin", + G_CALLBACK (view_on_drag_begin_cb), + view); gtk_grid_attach (GTK_GRID (view), priv->display, 0, 0, 1, 1); @@ -2259,8 +2283,9 @@ eom_scroll_view_set_popup (EomScrollView *view, GTK_WIDGET (view), NULL); - g_signal_connect (G_OBJECT (view), "button_press_event", - G_CALLBACK (view_on_button_press_event_cb), NULL); + g_signal_connect (view, "button_press_event", + G_CALLBACK (view_on_button_press_event_cb), + NULL); } static gboolean diff --git a/src/eom-sidebar.c b/src/eom-sidebar.c index faf8321..39e7d0a 100644 --- a/src/eom-sidebar.c +++ b/src/eom-sidebar.c @@ -382,12 +382,12 @@ eom_sidebar_init (EomSidebar *eom_sidebar) GTK_RELIEF_NONE); g_signal_connect (eom_sidebar->priv->select_button, "button_press_event", - G_CALLBACK (eom_sidebar_select_button_press_cb), - eom_sidebar); + G_CALLBACK (eom_sidebar_select_button_press_cb), + eom_sidebar); g_signal_connect (eom_sidebar->priv->select_button, "key_press_event", - G_CALLBACK (eom_sidebar_select_button_key_press_cb), - eom_sidebar); + G_CALLBACK (eom_sidebar_select_button_key_press_cb), + eom_sidebar); select_hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 6); @@ -416,8 +416,8 @@ eom_sidebar_init (EomSidebar *eom_sidebar) gtk_button_set_relief (GTK_BUTTON (close_button), GTK_RELIEF_NONE); g_signal_connect (close_button, "clicked", - G_CALLBACK (eom_sidebar_close_clicked_cb), - eom_sidebar); + G_CALLBACK (eom_sidebar_close_clicked_cb), + eom_sidebar); image = gtk_image_new_from_icon_name ("window-close", GTK_ICON_SIZE_MENU); @@ -430,8 +430,8 @@ eom_sidebar_init (EomSidebar *eom_sidebar) eom_sidebar->priv->menu = gtk_menu_new (); g_signal_connect (eom_sidebar->priv->menu, "deactivate", - G_CALLBACK (eom_sidebar_menu_deactivate_cb), - eom_sidebar->priv->select_button); + G_CALLBACK (eom_sidebar_menu_deactivate_cb), + eom_sidebar->priv->select_button); gtk_menu_attach_to_widget (GTK_MENU (eom_sidebar->priv->menu), GTK_WIDGET (eom_sidebar), @@ -481,8 +481,8 @@ eom_sidebar_add_page (EomSidebar *eom_sidebar, menu_item = gtk_menu_item_new_with_label (title); g_signal_connect (menu_item, "activate", - G_CALLBACK (eom_sidebar_menu_item_activate_cb), - eom_sidebar); + G_CALLBACK (eom_sidebar_menu_item_activate_cb), + eom_sidebar); gtk_widget_show (menu_item); @@ -521,8 +521,7 @@ eom_sidebar_add_page (EomSidebar *eom_sidebar, eom_sidebar_update_arrow_visibility (eom_sidebar); - g_signal_emit (G_OBJECT (eom_sidebar), - signals[SIGNAL_PAGE_ADDED], 0, main_widget); + g_signal_emit (eom_sidebar, signals[SIGNAL_PAGE_ADDED], 0, main_widget); } void @@ -567,8 +566,7 @@ eom_sidebar_remove_page (EomSidebar *eom_sidebar, GtkWidget *main_widget) eom_sidebar_update_arrow_visibility (eom_sidebar); - g_signal_emit (G_OBJECT (eom_sidebar), - signals[SIGNAL_PAGE_REMOVED], 0, main_widget); + g_signal_emit (eom_sidebar, signals[SIGNAL_PAGE_REMOVED], 0, main_widget); } } diff --git a/src/eom-thumb-view.c b/src/eom-thumb-view.c index 05b0416..bc1184e 100644 --- a/src/eom-thumb-view.c +++ b/src/eom-thumb-view.c @@ -131,17 +131,17 @@ eom_thumb_view_constructed (GObject *object) g_object_set (thumbview, "has-tooltip", TRUE, NULL); - g_signal_connect (thumbview, - "query-tooltip", - G_CALLBACK (thumbview_on_query_tooltip_cb), - NULL); + g_signal_connect (thumbview, "query-tooltip", + G_CALLBACK (thumbview_on_query_tooltip_cb), + NULL); thumbview->priv->start_thumb = 0; thumbview->priv->end_thumb = 0; thumbview->priv->menu = NULL; - g_signal_connect (G_OBJECT (thumbview), "parent-set", - G_CALLBACK (thumbview_on_parent_set_cb), NULL); + g_signal_connect (thumbview, "parent-set", + G_CALLBACK (thumbview_on_parent_set_cb), + NULL); gtk_icon_view_enable_model_drag_source (GTK_ICON_VIEW (thumbview), 0, NULL, 0, @@ -151,8 +151,9 @@ eom_thumb_view_constructed (GObject *object) GDK_ACTION_ASK); gtk_drag_source_add_uri_targets (GTK_WIDGET (thumbview)); - g_signal_connect (G_OBJECT (thumbview), "drag-data-get", - G_CALLBACK (thumbview_on_drag_data_get_cb), NULL); + g_signal_connect (thumbview, "drag-data-get", + G_CALLBACK (thumbview_on_drag_data_get_cb), + NULL); } static void @@ -380,20 +381,20 @@ thumbview_on_parent_set_cb (GtkWidget *widget, vadjustment = gtk_scrolled_window_get_vadjustment (GTK_SCROLLED_WINDOW (sw)); /* when scrolling */ - g_signal_connect_data (G_OBJECT (hadjustment), "value-changed", - G_CALLBACK (thumbview_on_visible_range_changed_cb), - thumbview, NULL, G_CONNECT_SWAPPED | G_CONNECT_AFTER); - g_signal_connect_data (G_OBJECT (vadjustment), "value-changed", - G_CALLBACK (thumbview_on_visible_range_changed_cb), - thumbview, NULL, G_CONNECT_SWAPPED | G_CONNECT_AFTER); + g_signal_connect_data (hadjustment, "value-changed", + G_CALLBACK (thumbview_on_visible_range_changed_cb), + thumbview, NULL, G_CONNECT_SWAPPED | G_CONNECT_AFTER); + g_signal_connect_data (vadjustment, "value-changed", + G_CALLBACK (thumbview_on_visible_range_changed_cb), + thumbview, NULL, G_CONNECT_SWAPPED | G_CONNECT_AFTER); /* when the adjustment is changed, ie. probably we have new images added. */ - g_signal_connect_data (G_OBJECT (hadjustment), "changed", - G_CALLBACK (thumbview_on_adjustment_changed_cb), - thumbview, NULL, G_CONNECT_SWAPPED | G_CONNECT_AFTER); - g_signal_connect_data (G_OBJECT (vadjustment), "changed", - G_CALLBACK (thumbview_on_adjustment_changed_cb), - thumbview, NULL, G_CONNECT_SWAPPED | G_CONNECT_AFTER); + g_signal_connect_data (hadjustment, "changed", + G_CALLBACK (thumbview_on_adjustment_changed_cb), + thumbview, NULL, G_CONNECT_SWAPPED | G_CONNECT_AFTER); + g_signal_connect_data (vadjustment, "changed", + G_CALLBACK (thumbview_on_adjustment_changed_cb), + thumbview, NULL, G_CONNECT_SWAPPED | G_CONNECT_AFTER); /* when resizing the scrolled window */ g_signal_connect_swapped (G_OBJECT (sw), "size-allocate", @@ -609,9 +610,9 @@ thumbview_on_query_tooltip_cb (GtkWidget *widget, EomJob *job; job = eom_job_load_new (image, data); - g_signal_connect (G_OBJECT (job), "finished", - G_CALLBACK (on_data_loaded_cb), - widget); + g_signal_connect (job, "finished", + G_CALLBACK (on_data_loaded_cb), + widget); eom_job_queue_add_job (job); g_object_unref (image); g_object_unref (job); @@ -730,13 +731,12 @@ eom_thumb_view_set_model (EomThumbView *thumbview, EomListStore *store) } } - priv->image_add_id = g_signal_connect (G_OBJECT (store), "row-inserted", - G_CALLBACK (eom_thumb_view_row_inserted_cb), - thumbview); - priv->image_removed_id = g_signal_connect (G_OBJECT (store), - "row-deleted", - G_CALLBACK (eom_thumb_view_row_deleted_cb), - thumbview); + priv->image_add_id = g_signal_connect (store, "row-inserted", + G_CALLBACK (eom_thumb_view_row_inserted_cb), + thumbview); + priv->image_removed_id = g_signal_connect (store, "row-deleted", + G_CALLBACK (eom_thumb_view_row_deleted_cb), + thumbview); thumbview->priv->n_images = eom_list_store_length (store); @@ -1047,9 +1047,9 @@ eom_thumb_view_set_thumbnail_popup (EomThumbView *thumbview, GTK_WIDGET (thumbview), NULL); - g_signal_connect (G_OBJECT (thumbview), "button_press_event", - G_CALLBACK (thumbview_on_button_press_event_cb), NULL); - + g_signal_connect (thumbview, "button_press_event", + G_CALLBACK (thumbview_on_button_press_event_cb), + NULL); } diff --git a/src/eom-window.c b/src/eom-window.c index 9f772c4..a455ba5 100644 --- a/src/eom-window.c +++ b/src/eom-window.c @@ -860,7 +860,8 @@ image_file_changed_cb (EomImage *img, EomWindow *window) eom_window_set_message_area (window, info_bar); g_signal_connect (info_bar, "response", - G_CALLBACK (file_changed_info_bar_response), window); + G_CALLBACK (file_changed_info_bar_response), + window); } static void @@ -879,13 +880,12 @@ eom_window_display_image (EomWindow *window, EomImage *image) priv = window->priv; if (image != NULL) { - g_signal_connect (image, - "thumbnail_changed", - G_CALLBACK (image_thumb_changed_cb), - window); + g_signal_connect (image, "thumbnail_changed", + G_CALLBACK (image_thumb_changed_cb), + window); g_signal_connect (image, "file-changed", - G_CALLBACK (image_file_changed_cb), - window); + G_CALLBACK (image_file_changed_cb), + window); image_thumb_changed_cb (image, window); } @@ -1030,10 +1030,9 @@ eom_window_update_openwith_menu (EomWindow *window, EomImage *image) g_object_set_data_full (G_OBJECT (action), "app", app, (GDestroyNotify) g_object_unref); - g_signal_connect (action, - "activate", - G_CALLBACK (open_with_launch_application_cb), - image); + g_signal_connect (action, "activate", + G_CALLBACK (open_with_launch_application_cb), + image); G_GNUC_BEGIN_IGNORE_DEPRECATIONS; gtk_action_group_add_action (priv->actions_open_with, action); @@ -1112,12 +1111,12 @@ eom_window_clear_load_job (EomWindow *window) eom_job_queue_remove_job (priv->load_job); g_signal_handlers_disconnect_by_func (priv->load_job, - eom_job_progress_cb, - window); + eom_job_progress_cb, + window); g_signal_handlers_disconnect_by_func (priv->load_job, - eom_job_load_cb, - window); + eom_job_load_cb, + window); eom_image_cancel_load (EOM_JOB_LOAD (priv->load_job)->image); @@ -1308,11 +1307,11 @@ eom_job_load_cb (EomJobLoad *job, gpointer data) if (priv->image != NULL) { g_signal_handlers_disconnect_by_func (priv->image, - image_thumb_changed_cb, - window); + image_thumb_changed_cb, + window); g_signal_handlers_disconnect_by_func (priv->image, - image_file_changed_cb, - window); + image_file_changed_cb, + window); g_object_unref (priv->image); } @@ -1337,10 +1336,9 @@ eom_job_load_cb (EomJobLoad *job, gpointer data) eom_image_get_caption (job->image), EOM_JOB (job)->error); - g_signal_connect (message_area, - "response", - G_CALLBACK (eom_window_error_message_area_response), - window); + g_signal_connect (message_area, "response", + G_CALLBACK (eom_window_error_message_area_response), + window); gtk_window_set_icon (GTK_WINDOW (window), NULL); gtk_window_set_title (GTK_WINDOW (window), @@ -1373,10 +1371,9 @@ eom_job_load_cb (EomJobLoad *job, gpointer data) if (window->priv->status == EOM_WINDOW_STATUS_INIT) { window->priv->status = EOM_WINDOW_STATUS_NORMAL; - g_signal_handlers_disconnect_by_func - (job->image, - G_CALLBACK (eom_window_obtain_desired_size), - window); + g_signal_handlers_disconnect_by_func (job->image, + eom_window_obtain_desired_size, + window); } G_GNUC_BEGIN_IGNORE_DEPRECATIONS; @@ -1402,8 +1399,8 @@ eom_window_clear_transform_job (EomWindow *window) eom_job_queue_remove_job (priv->transform_job); g_signal_handlers_disconnect_by_func (priv->transform_job, - eom_job_transform_cb, - window); + eom_job_transform_cb, + window); g_object_unref (priv->transform_job); priv->transform_job = NULL; } @@ -1455,15 +1452,13 @@ apply_transformation (EomWindow *window, EomTransform *trans) priv->transform_job = eom_job_transform_new (images, trans); - g_signal_connect (priv->transform_job, - "finished", - G_CALLBACK (eom_job_transform_cb), - window); + g_signal_connect (priv->transform_job, "finished", + G_CALLBACK (eom_job_transform_cb), + window); - g_signal_connect (priv->transform_job, - "progress", - G_CALLBACK (eom_job_progress_cb), - window); + g_signal_connect (priv->transform_job, "progress", + G_CALLBACK (eom_job_progress_cb), + window); eom_job_queue_add_job (priv->transform_job); } @@ -1518,23 +1513,20 @@ handle_image_selection_changed_cb (EomThumbView *thumbview, EomWindow *window) } if (priv->status == EOM_WINDOW_STATUS_INIT) { - g_signal_connect (image, - "size-prepared", - G_CALLBACK (eom_window_obtain_desired_size), - window); + g_signal_connect (image, "size-prepared", + G_CALLBACK (eom_window_obtain_desired_size), + window); } priv->load_job = eom_job_load_new (image, EOM_IMAGE_DATA_ALL); - g_signal_connect (priv->load_job, - "finished", - G_CALLBACK (eom_job_load_cb), - window); + g_signal_connect (priv->load_job, "finished", + G_CALLBACK (eom_job_load_cb), + window); - g_signal_connect (priv->load_job, - "progress", - G_CALLBACK (eom_job_progress_cb), - window); + g_signal_connect (priv->load_job, "progress", + G_CALLBACK (eom_job_progress_cb), + window); eom_job_queue_add_job (priv->load_job); @@ -1633,15 +1625,17 @@ eom_window_update_fullscreen_action (EomWindow *window) action = gtk_action_group_get_action (window->priv->actions_image, "ViewFullscreen"); - g_signal_handlers_block_by_func - (action, G_CALLBACK (eom_window_cmd_fullscreen), window); + g_signal_handlers_block_by_func (action, + eom_window_cmd_fullscreen, + window); gtk_toggle_action_set_active (GTK_TOGGLE_ACTION (action), window->priv->mode == EOM_WINDOW_MODE_FULLSCREEN); G_GNUC_END_IGNORE_DEPRECATIONS; - g_signal_handlers_unblock_by_func - (action, G_CALLBACK (eom_window_cmd_fullscreen), window); + g_signal_handlers_unblock_by_func (action, + eom_window_cmd_fullscreen, + window); } static void @@ -1653,15 +1647,17 @@ eom_window_update_slideshow_action (EomWindow *window) action = gtk_action_group_get_action (window->priv->actions_collection, "ViewSlideshow"); - g_signal_handlers_block_by_func - (action, G_CALLBACK (eom_window_cmd_slideshow), window); + g_signal_handlers_block_by_func (action, + eom_window_cmd_slideshow, + window); gtk_toggle_action_set_active (GTK_TOGGLE_ACTION (action), window->priv->mode == EOM_WINDOW_MODE_SLIDESHOW); G_GNUC_END_IGNORE_DEPRECATIONS; - g_signal_handlers_unblock_by_func - (action, G_CALLBACK (eom_window_cmd_slideshow), window); + g_signal_handlers_unblock_by_func (action, + eom_window_cmd_slideshow, + window); } static void @@ -1673,15 +1669,17 @@ eom_window_update_pause_slideshow_action (EomWindow *window) action = gtk_action_group_get_action (window->priv->actions_image, "PauseSlideshow"); - g_signal_handlers_block_by_func - (action, G_CALLBACK (eom_window_cmd_pause_slideshow), window); + g_signal_handlers_block_by_func (action, + eom_window_cmd_pause_slideshow, + window); gtk_toggle_action_set_active (GTK_TOGGLE_ACTION (action), window->priv->mode != EOM_WINDOW_MODE_SLIDESHOW); G_GNUC_END_IGNORE_DEPRECATIONS; - g_signal_handlers_unblock_by_func - (action, G_CALLBACK (eom_window_cmd_pause_slideshow), window); + g_signal_handlers_unblock_by_func (action, + eom_window_cmd_pause_slideshow, + window); } static void @@ -1908,8 +1906,8 @@ eom_window_get_exit_fullscreen_button (EomWindow *window) gtk_button_set_image (GTK_BUTTON (button), gtk_image_new_from_icon_name ("view-restore", GTK_ICON_SIZE_BUTTON)); g_signal_connect (button, "clicked", - G_CALLBACK (exit_fullscreen_button_clicked_cb), - window); + G_CALLBACK (exit_fullscreen_button_clicked_cb), + window); return button; } @@ -1944,13 +1942,12 @@ eom_window_create_fullscreen_popup (EomWindow *window) screen = gtk_widget_get_screen (GTK_WIDGET (window)); g_signal_connect_object (screen, "size-changed", - G_CALLBACK (screen_size_changed_cb), - window, 0); + G_CALLBACK (screen_size_changed_cb), + window, 0); - g_signal_connect (popup, - "enter-notify-event", - G_CALLBACK (fullscreen_leave_notify_cb), - window); + g_signal_connect (popup, "enter-notify-event", + G_CALLBACK (fullscreen_leave_notify_cb), + window); gtk_window_set_screen (GTK_WINDOW (popup), screen); @@ -2096,25 +2093,21 @@ eom_window_run_fullscreen (EomWindow *window, gboolean slideshow) g_assert (GTK_IS_WIDGET (menubar)); gtk_widget_hide (menubar); - g_signal_connect (priv->view, - "motion-notify-event", - G_CALLBACK (fullscreen_motion_notify_cb), - window); + g_signal_connect (priv->view, "motion-notify-event", + G_CALLBACK (fullscreen_motion_notify_cb), + window); - g_signal_connect (priv->view, - "leave-notify-event", - G_CALLBACK (fullscreen_leave_notify_cb), - window); + g_signal_connect (priv->view, "leave-notify-event", + G_CALLBACK (fullscreen_leave_notify_cb), + window); - g_signal_connect (priv->thumbview, - "motion-notify-event", - G_CALLBACK (fullscreen_motion_notify_cb), - window); + g_signal_connect (priv->thumbview, "motion-notify-event", + G_CALLBACK (fullscreen_motion_notify_cb), + window); - g_signal_connect (priv->thumbview, - "leave-notify-event", - G_CALLBACK (fullscreen_leave_notify_cb), - window); + g_signal_connect (priv->thumbview, "leave-notify-event", + G_CALLBACK (fullscreen_leave_notify_cb), + window); fullscreen_set_timeout (window); @@ -2178,20 +2171,20 @@ eom_window_stop_fullscreen (EomWindow *window, gboolean slideshow) } g_signal_handlers_disconnect_by_func (priv->view, - (gpointer) fullscreen_motion_notify_cb, - window); + fullscreen_motion_notify_cb, + window); g_signal_handlers_disconnect_by_func (priv->view, - (gpointer) fullscreen_leave_notify_cb, + fullscreen_leave_notify_cb, window); g_signal_handlers_disconnect_by_func (priv->thumbview, - (gpointer) fullscreen_motion_notify_cb, - window); + fullscreen_motion_notify_cb, + window); g_signal_handlers_disconnect_by_func (priv->thumbview, - (gpointer) fullscreen_leave_notify_cb, - window); + fullscreen_leave_notify_cb, + window); update_ui_visibility (window); @@ -2261,7 +2254,8 @@ eom_window_print (EomWindow *window) _("Error printing file:\n%s"), error->message); g_signal_connect (dialog, "response", - G_CALLBACK (gtk_widget_destroy), NULL); + G_CALLBACK (gtk_widget_destroy), + NULL); gtk_widget_show (dialog); g_error_free (error); } else if (res == GTK_PRINT_OPERATION_RESULT_APPLY) { @@ -2326,8 +2320,8 @@ eom_window_cmd_file_open (GtkAction *action, gpointer user_data) } g_signal_connect (dlg, "response", - G_CALLBACK (file_open_dialog_response_cb), - window); + G_CALLBACK (file_open_dialog_response_cb), + window); gtk_widget_show_all (dlg); } @@ -2338,8 +2332,8 @@ eom_job_close_save_cb (EomJobSave *job, gpointer user_data) EomWindow *window = EOM_WINDOW (user_data); g_signal_handlers_disconnect_by_func (job, - eom_job_close_save_cb, - window); + eom_job_close_save_cb, + window); gtk_widget_destroy (GTK_WIDGET (window)); } @@ -2360,10 +2354,9 @@ close_confirmation_dialog_response_handler (EomCloseConfirmationDialog *dlg, /* save selected images */ selected_images = eom_close_confirmation_dialog_get_selected_images (dlg); if (eom_window_save_images (window, selected_images)) { - g_signal_connect (priv->save_job, - "finished", - G_CALLBACK (eom_job_close_save_cb), - window); + g_signal_connect (priv->save_job, "finished", + G_CALLBACK (eom_job_close_save_cb), + window); eom_job_queue_add_job (priv->save_job); } @@ -2422,10 +2415,9 @@ eom_window_unsaved_images_confirm (EomWindow *window) list); g_list_free (list); - g_signal_connect (dialog, - "response", - G_CALLBACK (close_confirmation_dialog_response_handler), - window); + g_signal_connect (dialog, "response", + G_CALLBACK (close_confirmation_dialog_response_handler), + window); gtk_window_set_destroy_with_parent (GTK_WINDOW (dialog), TRUE); gtk_widget_show (dialog); @@ -2558,10 +2550,9 @@ eom_window_cmd_edit_toolbar (GtkAction *action, gpointer *user_data) g_object_set_data (G_OBJECT (dialog), "EggToolbarEditor", editor); - g_signal_connect (dialog, - "response", - G_CALLBACK (eom_window_cmd_edit_toolbar_cb), - window); + g_signal_connect (dialog, "response", + G_CALLBACK (eom_window_cmd_edit_toolbar_cb), + window); gtk_widget_show_all (dialog); } @@ -2828,7 +2819,8 @@ eom_window_set_wallpaper (EomWindow *window, const gchar *filename, const gchar gtk_info_bar_set_default_response (GTK_INFO_BAR (info_bar), GTK_RESPONSE_YES); g_signal_connect (info_bar, "response", - G_CALLBACK (wallpaper_info_bar_response), window); + G_CALLBACK (wallpaper_info_bar_response), + window); } static void @@ -2838,12 +2830,12 @@ eom_job_save_cb (EomJobSave *job, gpointer user_data) GtkAction *action_save; g_signal_handlers_disconnect_by_func (job, - eom_job_save_cb, - window); + eom_job_save_cb, + window); g_signal_handlers_disconnect_by_func (job, - eom_job_save_progress_cb, - window); + eom_job_save_progress_cb, + window); g_object_unref (window->priv->save_job); window->priv->save_job = NULL; @@ -2916,15 +2908,13 @@ eom_window_save_images (EomWindow *window, GList *images) priv->save_job = eom_job_save_new (images); - g_signal_connect (priv->save_job, - "finished", - G_CALLBACK (eom_job_save_cb), - window); + g_signal_connect (priv->save_job, "finished", + G_CALLBACK (eom_job_save_cb), + window); - g_signal_connect (priv->save_job, - "progress", - G_CALLBACK (eom_job_save_progress_cb), - window); + g_signal_connect (priv->save_job, "progress", + G_CALLBACK (eom_job_save_progress_cb), + window); return TRUE; } @@ -3060,15 +3050,13 @@ eom_window_cmd_save_as (GtkAction *action, gpointer user_data) return; } - g_signal_connect (priv->save_job, - "finished", - G_CALLBACK (eom_job_save_cb), - window); + g_signal_connect (priv->save_job, "finished", + G_CALLBACK (eom_job_save_cb), + window); - g_signal_connect (priv->save_job, - "progress", - G_CALLBACK (eom_job_save_progress_cb), - window); + g_signal_connect (priv->save_job, "progress", + G_CALLBACK (eom_job_save_progress_cb), + window); eom_job_queue_add_job (priv->save_job); } @@ -3248,14 +3236,12 @@ eom_window_cmd_wallpaper (GtkAction *action, gpointer user_data) files = g_list_append (files, eom_image_get_file (image)); priv->copy_job = eom_job_copy_new (files, g_get_user_data_dir ()); - g_signal_connect (priv->copy_job, - "finished", - G_CALLBACK (eom_job_copy_cb), - window); - g_signal_connect (priv->copy_job, - "progress", - G_CALLBACK (eom_job_progress_cb), - window); + g_signal_connect (priv->copy_job, "finished", + G_CALLBACK (eom_job_copy_cb), + window); + g_signal_connect (priv->copy_job, "progress", + G_CALLBACK (eom_job_progress_cb), + window); eom_job_queue_add_job (priv->copy_job); g_object_unref (file); @@ -3960,9 +3946,11 @@ connect_proxy_cb (GtkUIManager *manager, if (GTK_IS_MENU_ITEM (proxy)) { disconnect_proxy_cb (manager, action, proxy, window); g_signal_connect (proxy, "select", - G_CALLBACK (menu_item_select_cb), window); + G_CALLBACK (menu_item_select_cb), + window); g_signal_connect (proxy, "deselect", - G_CALLBACK (menu_item_deselect_cb), window); + G_CALLBACK (menu_item_deselect_cb), + window); } } @@ -3973,10 +3961,12 @@ disconnect_proxy_cb (GtkUIManager *manager, EomWindow *window) { if (GTK_IS_MENU_ITEM (proxy)) { - g_signal_handlers_disconnect_by_func - (proxy, G_CALLBACK (menu_item_select_cb), window); - g_signal_handlers_disconnect_by_func - (proxy, G_CALLBACK (menu_item_deselect_cb), window); + g_signal_handlers_disconnect_by_func (proxy, + menu_item_select_cb, + window); + g_signal_handlers_disconnect_by_func (proxy, + menu_item_deselect_cb, + window); } } @@ -4079,9 +4069,9 @@ eom_window_update_recent_files_menu (EomWindow *window) actions = gtk_action_group_list_actions (priv->actions_recent); for (li = actions; li != NULL; li = li->next) { - g_signal_handlers_disconnect_by_func (GTK_ACTION (li->data), - G_CALLBACK(eom_window_open_recent_cb), - window); + g_signal_handlers_disconnect_by_func (li->data, + eom_window_open_recent_cb, + window); gtk_action_group_remove_action (priv->actions_recent, GTK_ACTION (li->data)); @@ -4140,8 +4130,8 @@ eom_window_update_recent_files_menu (EomWindow *window) g_object_set (G_OBJECT (action), "icon-name", "image-x-generic", NULL); g_signal_connect (action, "activate", - G_CALLBACK (eom_window_open_recent_cb), - window); + G_CALLBACK (eom_window_open_recent_cb), + window); G_GNUC_BEGIN_IGNORE_DEPRECATIONS; gtk_action_group_add_action (priv->actions_recent, action); @@ -4386,7 +4376,8 @@ eom_window_add_open_editor_action (EomWindow *window) gtk_action_set_is_important (action, TRUE); g_signal_connect (action, "activate", - G_CALLBACK (eom_window_open_editor), window); + G_CALLBACK (eom_window_open_editor), + window); gtk_action_group_add_action (window->priv->actions_image, action); G_GNUC_END_IGNORE_DEPRECATIONS; @@ -4487,9 +4478,12 @@ eom_window_construct_ui (EomWindow *window) } g_signal_connect (priv->ui_mgr, "connect_proxy", - G_CALLBACK (connect_proxy_cb), window); + G_CALLBACK (connect_proxy_cb), + window); + g_signal_connect (priv->ui_mgr, "disconnect_proxy", - G_CALLBACK (disconnect_proxy_cb), window); + G_CALLBACK (disconnect_proxy_cb), + window); menubar = gtk_ui_manager_get_widget (priv->ui_mgr, "/MainMenu"); g_assert (GTK_IS_WIDGET (menubar)); @@ -4547,8 +4541,8 @@ eom_window_construct_ui (EomWindow *window) G_GNUC_END_IGNORE_DEPRECATIONS; g_signal_connect (gtk_recent_manager_get_default (), "changed", - G_CALLBACK (eom_window_recent_manager_changed_cb), - window); + G_CALLBACK (eom_window_recent_manager_changed_cb), + window); eom_window_update_recent_files_menu (window); @@ -4582,25 +4576,21 @@ eom_window_construct_ui (EomWindow *window) gtk_widget_set_size_request (priv->sidebar, 210, -1); - g_signal_connect_after (priv->sidebar, - "show", - G_CALLBACK (eom_window_sidebar_visibility_changed), - window); + g_signal_connect_after (priv->sidebar, "show", + G_CALLBACK (eom_window_sidebar_visibility_changed), + window); - g_signal_connect_after (priv->sidebar, - "hide", - G_CALLBACK (eom_window_sidebar_visibility_changed), - window); + g_signal_connect_after (priv->sidebar, "hide", + G_CALLBACK (eom_window_sidebar_visibility_changed), + window); - g_signal_connect_after (priv->sidebar, - "page-added", - G_CALLBACK (eom_window_sidebar_page_added), - window); + g_signal_connect_after (priv->sidebar, "page-added", + G_CALLBACK (eom_window_sidebar_page_added), + window); - g_signal_connect_after (priv->sidebar, - "page-removed", - G_CALLBACK (eom_window_sidebar_page_removed), - window); + g_signal_connect_after (priv->sidebar, "page-removed", + G_CALLBACK (eom_window_sidebar_page_removed), + window); priv->view = eom_scroll_view_new (); @@ -4609,10 +4599,9 @@ eom_window_construct_ui (EomWindow *window) GTK_WIDGET (eom_metadata_sidebar_new (window))); gtk_widget_set_size_request (GTK_WIDGET (priv->view), 100, 100); - g_signal_connect (G_OBJECT (priv->view), - "zoom_changed", - G_CALLBACK (view_zoom_changed_cb), - window); + g_signal_connect (priv->view, "zoom_changed", + G_CALLBACK (view_zoom_changed_cb), + window); g_settings_bind (priv->view_settings, EOM_CONF_VIEW_SCROLL_WHEEL_ZOOM, priv->view, "scrollwheel-zoom", G_SETTINGS_BIND_GET); @@ -4643,8 +4632,9 @@ eom_window_construct_ui (EomWindow *window) gtk_icon_view_set_margin (GTK_ICON_VIEW (priv->thumbview), 4); gtk_icon_view_set_row_spacing (GTK_ICON_VIEW (priv->thumbview), 0); - g_signal_connect (G_OBJECT (priv->thumbview), "selection_changed", - G_CALLBACK (handle_image_selection_changed_cb), window); + g_signal_connect (priv->thumbview, "selection_changed", + G_CALLBACK (handle_image_selection_changed_cb), + window); priv->nav = eom_thumb_nav_new (priv->thumbview, EOM_THUMB_NAV_MODE_ONE_ROW, @@ -4710,10 +4700,9 @@ eom_window_init (EomWindow *window) priv->fullscreen_settings = g_settings_new (EOM_CONF_FULLSCREEN); priv->lockdown_settings = g_settings_new (EOM_CONF_LOCKDOWN_SCHEMA); - g_signal_connect (priv->lockdown_settings, - "changed::" EOM_CONF_LOCKDOWN_CAN_SAVE, - G_CALLBACK (eom_window_can_save_changed_cb), - window); + g_signal_connect (priv->lockdown_settings, "changed::" EOM_CONF_LOCKDOWN_CAN_SAVE, + G_CALLBACK (eom_window_can_save_changed_cb), + window); window->priv->store = NULL; window->priv->image = NULL; @@ -4789,29 +4778,29 @@ eom_window_dispose (GObject *object) /* Disconnect so we don't get any unwanted callbacks * when the thumb view is disposed. */ g_signal_handlers_disconnect_by_func (priv->thumbview, - G_CALLBACK (handle_image_selection_changed_cb), - window); + handle_image_selection_changed_cb, + window); g_clear_object (&priv->thumbview); } if (priv->store != NULL) { g_signal_handlers_disconnect_by_func (priv->store, - eom_window_list_store_image_added, - window); + eom_window_list_store_image_added, + window); g_signal_handlers_disconnect_by_func (priv->store, - eom_window_list_store_image_removed, - window); + eom_window_list_store_image_removed, + window); g_object_unref (priv->store); priv->store = NULL; } if (priv->image != NULL) { g_signal_handlers_disconnect_by_func (priv->image, - image_thumb_changed_cb, - window); + image_thumb_changed_cb, + window); g_signal_handlers_disconnect_by_func (priv->image, - image_file_changed_cb, - window); + image_file_changed_cb, + window); g_object_unref (priv->image); priv->image = NULL; } @@ -4852,8 +4841,8 @@ eom_window_dispose (GObject *object) eom_window_uninhibit_screensaver (window); g_signal_handlers_disconnect_by_func (gtk_recent_manager_get_default (), - G_CALLBACK (eom_window_recent_manager_changed_cb), - window); + eom_window_recent_manager_changed_cb, + window); priv->recent_menu_id = 0; @@ -5241,9 +5230,11 @@ eom_window_constructor (GType type, peas_extension_set_call (priv->extensions, "activate"); g_signal_connect (priv->extensions, "extension-added", - G_CALLBACK (on_extension_added), object); + G_CALLBACK (on_extension_added), + object); g_signal_connect (priv->extensions, "extension-removed", - G_CALLBACK (on_extension_removed), object); + G_CALLBACK (on_extension_removed), + object); return object; } @@ -5413,15 +5404,13 @@ eom_job_model_cb (EomJobModel *job, gpointer data) eom_thumb_view_set_model (EOM_THUMB_VIEW (priv->thumbview), priv->store); - g_signal_connect (G_OBJECT (priv->store), - "row-inserted", - G_CALLBACK (eom_window_list_store_image_added), - window); + g_signal_connect (priv->store, "row-inserted", + G_CALLBACK (eom_window_list_store_image_added), + window); - g_signal_connect (G_OBJECT (priv->store), - "row-deleted", - G_CALLBACK (eom_window_list_store_image_removed), - window); + g_signal_connect (priv->store, "row-deleted", + G_CALLBACK (eom_window_list_store_image_removed), + window); if (n_images == 0) { gint n_files; @@ -5473,10 +5462,9 @@ eom_window_open_file_list (EomWindow *window, GSList *file_list) job = eom_job_model_new (file_list); - g_signal_connect (job, - "finished", - G_CALLBACK (eom_job_model_cb), - window); + g_signal_connect (job, "finished", + G_CALLBACK (eom_job_model_cb), + window); eom_job_queue_add_job (job); g_object_unref (job); |