From 5b09db3c6a81a31077ce710375bfbd397e26dc4a Mon Sep 17 00:00:00 2001 From: Hiroyuki Ikezoe Date: Tue, 20 Jan 2009 23:04:57 +0000 Subject: [PATCH] shell/ev-sidebar-links.c 2009-01-21 Hiroyuki Ikezoe * shell/ev-sidebar-links.c * shell/ev-print-operation.c: * shell/ev-history.c: * shell/ev-file-monitor.c: * shell/ev-window.c: * shell/ev-password-view.c: * shell/ev-sidebar-thumbnails.c: * shell/ev-sidebar-attachments.c: * libview/ev-pixbuf-cache.c: * libview/ev-view.c: Remove needless G_OBJECT from g_signal_connect. Bug #568386. svn path=/trunk/; revision=3370 --- ChangeLog | 14 ++++++++++++++ libview/ev-pixbuf-cache.c | 4 ++-- libview/ev-view.c | 18 +++++++++--------- shell/ev-file-monitor.c | 2 +- shell/ev-history.c | 2 +- shell/ev-password-view.c | 2 +- shell/ev-print-operation.c | 6 +++--- shell/ev-sidebar-attachments.c | 6 +++--- shell/ev-sidebar-links.c | 6 +++--- shell/ev-sidebar-thumbnails.c | 4 ++-- shell/ev-window.c | 10 +++++----- 11 files changed, 44 insertions(+), 30 deletions(-) diff --git a/ChangeLog b/ChangeLog index 4f2aeec8..d6422943 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,17 @@ +2009-01-21 Hiroyuki Ikezoe + + * shell/ev-sidebar-links.c + * shell/ev-print-operation.c: + * shell/ev-history.c: + * shell/ev-file-monitor.c: + * shell/ev-window.c: + * shell/ev-password-view.c: + * shell/ev-sidebar-thumbnails.c: + * shell/ev-sidebar-attachments.c: + * libview/ev-pixbuf-cache.c: + * libview/ev-view.c: Remove needless G_OBJECT from g_signal_connect. + Bug #568386. + 2009-01-20 Tomeu Vizoso * libdocument/ev-document-info.h: diff --git a/libview/ev-pixbuf-cache.c b/libview/ev-pixbuf-cache.c index bcc5c023..d7d89f70 100644 --- a/libview/ev-pixbuf-cache.c +++ b/libview/ev-pixbuf-cache.c @@ -652,10 +652,10 @@ add_job (EvPixbufCache *pixbuf_cache, text, base); } - g_signal_connect (G_OBJECT (job_info->job), "page-ready", + g_signal_connect (job_info->job, "page-ready", G_CALLBACK (job_page_ready_cb), pixbuf_cache); - g_signal_connect (G_OBJECT (job_info->job), "finished", + g_signal_connect (job_info->job, "finished", G_CALLBACK (job_finished_cb), pixbuf_cache); ev_job_scheduler_push_job (job_info->job, priority); diff --git a/libview/ev-view.c b/libview/ev-view.c index 2bbca10b..31915452 100644 --- a/libview/ev-view.c +++ b/libview/ev-view.c @@ -1767,10 +1767,10 @@ ev_view_form_field_text_create_widget (EvView *view, g_free (txt); } - g_signal_connect (G_OBJECT (text), "changed", + g_signal_connect (text, "changed", G_CALLBACK (ev_view_form_field_text_changed), field); - g_signal_connect_after (G_OBJECT (text), "activate", + g_signal_connect_after (text, "activate", G_CALLBACK (ev_view_form_field_destroy), view); break; @@ -1785,7 +1785,7 @@ ev_view_form_field_text_create_widget (EvView *view, g_free (txt); } - g_signal_connect (G_OBJECT (buffer), "changed", + g_signal_connect (buffer, "changed", G_CALLBACK (ev_view_form_field_text_changed), field); } @@ -1959,10 +1959,10 @@ ev_view_form_field_choice_create_widget (EvView *view, gtk_container_add (GTK_CONTAINER (choice), tree_view); gtk_widget_show (tree_view); - g_signal_connect (G_OBJECT (selection), "changed", + g_signal_connect (selection, "changed", G_CALLBACK (ev_view_form_field_choice_changed), field); - g_signal_connect_after (G_OBJECT (selection), "changed", + g_signal_connect_after (selection, "changed", G_CALLBACK (ev_view_form_field_destroy), view); } else if (field_choice->is_editable) { /* ComboBoxEntry */ @@ -1975,10 +1975,10 @@ ev_view_form_field_choice_create_widget (EvView *view, g_free (text); } - g_signal_connect (G_OBJECT (choice), "changed", + g_signal_connect (choice, "changed", G_CALLBACK (ev_view_form_field_choice_changed), field); - g_signal_connect_after (G_OBJECT (GTK_BIN (choice)->child), "activate", + g_signal_connect_after (GTK_BIN(choice)->child, "activate", G_CALLBACK (ev_view_form_field_destroy), view); } else { /* ComboBoxText */ @@ -1995,10 +1995,10 @@ ev_view_form_field_choice_create_widget (EvView *view, gtk_combo_box_set_active (GTK_COMBO_BOX (choice), selected_item); gtk_combo_box_popup (GTK_COMBO_BOX (choice)); - g_signal_connect (G_OBJECT (choice), "changed", + g_signal_connect (choice, "changed", G_CALLBACK (ev_view_form_field_choice_changed), field); - g_signal_connect_after (G_OBJECT (choice), "changed", + g_signal_connect_after (choice, "changed", G_CALLBACK (ev_view_form_field_destroy), view); } diff --git a/shell/ev-file-monitor.c b/shell/ev-file-monitor.c index 3db0e788..2b06d345 100644 --- a/shell/ev-file-monitor.c +++ b/shell/ev-file-monitor.c @@ -155,7 +155,7 @@ ev_file_monitor_new (const gchar *uri) file = g_file_new_for_uri (uri); ev_monitor->priv->monitor = g_file_monitor_file (file, G_FILE_MONITOR_NONE, NULL, &error); if (ev_monitor->priv->monitor) { - g_signal_connect (G_OBJECT (ev_monitor->priv->monitor), "changed", + g_signal_connect (ev_monitor->priv->monitor, "changed", G_CALLBACK (ev_file_monitor_changed_cb), ev_monitor); } else if (error) { g_warning ("%s", error->message); diff --git a/shell/ev-history.c b/shell/ev-history.c index cb015ccb..c7261205 100644 --- a/shell/ev-history.c +++ b/shell/ev-history.c @@ -117,7 +117,7 @@ ev_history_add_link (EvHistory *history, EvLink *link) history->priv->links); } - g_signal_emit (G_OBJECT (history), signals[HISTORY_CHANGED], 0); + g_signal_emit (history, signals[HISTORY_CHANGED], 0); } EvLink * diff --git a/shell/ev-password-view.c b/shell/ev-password-view.c index f7d0ca35..a71e423b 100644 --- a/shell/ev-password-view.c +++ b/shell/ev-password-view.c @@ -398,7 +398,7 @@ ev_password_view_ask_password (EvPasswordView *password_view) gtk_widget_show (choice); } - g_signal_connect (G_OBJECT (dialog), "response", + g_signal_connect (dialog, "response", G_CALLBACK (ev_password_dialog_got_response), password_view); diff --git a/shell/ev-print-operation.c b/shell/ev-print-operation.c index 17b7913b..3723bd81 100644 --- a/shell/ev-print-operation.c +++ b/shell/ev-print-operation.c @@ -927,10 +927,10 @@ export_print_page (EvPrintOperationExport *export) if (!export->job_export) { export->job_export = ev_job_export_new (op->document); - g_signal_connect (G_OBJECT (export->job_export), "finished", + g_signal_connect (export->job_export, "finished", G_CALLBACK (export_job_finished), (gpointer)export); - g_signal_connect (G_OBJECT (export->job_export), "cancelled", + g_signal_connect (export->job_export, "cancelled", G_CALLBACK (export_job_cancelled), (gpointer)export); } @@ -1151,7 +1151,7 @@ ev_print_operation_export_run (EvPrintOperation *op, gtk_print_unix_dialog_set_page_setup (GTK_PRINT_UNIX_DIALOG (dialog), export->page_setup); - g_signal_connect (G_OBJECT (dialog), "response", + g_signal_connect (dialog, "response", G_CALLBACK (ev_print_operation_export_print_dialog_response_cb), export); diff --git a/shell/ev-sidebar-attachments.c b/shell/ev-sidebar-attachments.c index 47549f6c..677d61fa 100644 --- a/shell/ev-sidebar-attachments.c +++ b/shell/ev-sidebar-attachments.c @@ -567,7 +567,7 @@ ev_sidebar_attachments_init (EvSidebarAttachments *ev_attachbar) "text-column", COLUMN_NAME, "pixbuf-column", COLUMN_ICON, NULL); - g_signal_connect_swapped (G_OBJECT (ev_attachbar->priv->icon_view), + g_signal_connect_swapped (ev_attachbar->priv->icon_view, "button-press-event", G_CALLBACK (ev_sidebar_attachments_button_press), (gpointer) ev_attachbar); @@ -605,7 +605,7 @@ ev_sidebar_attachments_init (EvSidebarAttachments *ev_attachbar) GDK_ACTION_COPY); #endif - g_signal_connect (G_OBJECT (ev_attachbar->priv->icon_view), + g_signal_connect (ev_attachbar->priv->icon_view, "drag-data-get", G_CALLBACK (ev_sidebar_attachments_drag_data_get), (gpointer) ev_attachbar); @@ -665,7 +665,7 @@ ev_sidebar_attachments_set_document (EvSidebarPage *page, screen = gtk_widget_get_screen (GTK_WIDGET (ev_attachbar)); ev_attachbar->priv->icon_theme = gtk_icon_theme_get_for_screen (screen); - g_signal_connect_swapped (G_OBJECT (ev_attachbar->priv->icon_theme), + g_signal_connect_swapped (ev_attachbar->priv->icon_theme, "changed", G_CALLBACK (ev_sidebar_attachments_update_icons), (gpointer) ev_attachbar); diff --git a/shell/ev-sidebar-links.c b/shell/ev-sidebar-links.c index 623753c9..91986f8c 100644 --- a/shell/ev-sidebar-links.c +++ b/shell/ev-sidebar-links.c @@ -439,11 +439,11 @@ ev_sidebar_links_construct (EvSidebarLinks *ev_sidebar_links) NULL); g_object_set (G_OBJECT (renderer), "style", PANGO_STYLE_ITALIC, NULL); - g_signal_connect (GTK_TREE_VIEW (priv->tree_view), + g_signal_connect (priv->tree_view, "button_press_event", G_CALLBACK (button_press_cb), ev_sidebar_links); - g_signal_connect (GTK_TREE_VIEW (priv->tree_view), + g_signal_connect (priv->tree_view, "popup_menu", G_CALLBACK (popup_menu_cb), ev_sidebar_links); @@ -658,7 +658,7 @@ job_finished_callback (EvJobLinks *job, sidebar_links); if (priv->row_activated_id <= 0) { priv->row_activated_id = - g_signal_connect (G_OBJECT (priv->tree_view), "row-activated", + g_signal_connect (priv->tree_view, "row-activated", G_CALLBACK (row_activated_callback), sidebar_links); } diff --git a/shell/ev-sidebar-thumbnails.c b/shell/ev-sidebar-thumbnails.c index cc4fbfca..08be12b2 100644 --- a/shell/ev-sidebar-thumbnails.c +++ b/shell/ev-sidebar-thumbnails.c @@ -593,11 +593,11 @@ ev_sidebar_thumbnails_init (EvSidebarThumbnails *ev_sidebar_thumbnails) gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (priv->swindow), GTK_SHADOW_IN); priv->vadjustment = gtk_scrolled_window_get_vadjustment (GTK_SCROLLED_WINDOW (priv->swindow)); - g_signal_connect_data (G_OBJECT (priv->vadjustment), "value-changed", + g_signal_connect_data (priv->vadjustment, "value-changed", G_CALLBACK (adjustment_changed_cb), ev_sidebar_thumbnails, NULL, G_CONNECT_SWAPPED | G_CONNECT_AFTER); - g_signal_connect_swapped (G_OBJECT (priv->swindow), "size-allocate", + g_signal_connect_swapped (priv->swindow, "size-allocate", G_CALLBACK (adjustment_changed_cb), ev_sidebar_thumbnails); gtk_box_pack_start (GTK_BOX (ev_sidebar_thumbnails), priv->swindow, TRUE, TRUE, 0); diff --git a/shell/ev-window.c b/shell/ev-window.c index 54db1498..6d501daa 100644 --- a/shell/ev-window.c +++ b/shell/ev-window.c @@ -1433,7 +1433,7 @@ ev_window_load_job_cb (EvJob *job, /* Create a monitor for the document */ ev_window->priv->monitor = ev_file_monitor_new (ev_window->priv->uri); - g_signal_connect_swapped (G_OBJECT (ev_window->priv->monitor), "changed", + g_signal_connect_swapped (ev_window->priv->monitor, "changed", G_CALLBACK (ev_window_document_changed), ev_window); @@ -2332,7 +2332,7 @@ ev_window_setup_recent (EvWindow *ev_window) gtk_recent_info_ref (info), (GDestroyNotify) gtk_recent_info_unref); - g_signal_connect (G_OBJECT (action), "activate", + g_signal_connect (action, "activate", G_CALLBACK (ev_window_cmd_recent_file_activate), (gpointer) ev_window); @@ -2947,13 +2947,13 @@ ev_window_print_range (EvWindow *ev_window, ev_window->priv->print_queue = g_queue_new (); op = ev_print_operation_new (ev_window->priv->document); - g_signal_connect (G_OBJECT (op), "begin_print", + g_signal_connect (op, "begin_print", G_CALLBACK (ev_window_print_operation_begin_print), (gpointer)ev_window); - g_signal_connect (G_OBJECT (op), "status_changed", + g_signal_connect (op, "status_changed", G_CALLBACK (ev_window_print_operation_status_changed), (gpointer)ev_window); - g_signal_connect (G_OBJECT (op), "done", + g_signal_connect (op, "done", G_CALLBACK (ev_window_print_operation_done), (gpointer)ev_window); -- 2.43.5