[gnome-commander/gcmd-1-3] Dropped superfluous casting to G_OBJECT
- From: Piotr Eljasiak <epiotr src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [gnome-commander/gcmd-1-3] Dropped superfluous casting to G_OBJECT
- Date: Wed, 29 Jul 2009 22:04:56 +0000 (UTC)
commit 3fd6a6cf9ab433060c2b09e42530627b4c36ab41
Author: Piotr Eljasiak <epiotr src gnome org>
Date: Wed Jul 29 23:54:31 2009 +0200
Dropped superfluous casting to G_OBJECT
src/eggcellrendererkeys.cc | 8 ++++----
src/gnome-cmd-bookmark-dialog.cc | 15 +++++----------
src/gnome-cmd-clist.cc | 2 +-
src/gnome-cmd-menu-button.cc | 2 +-
src/gnome-cmd-prepare-xfer-dialog.cc | 4 ++--
src/gnome-cmd-profile-component.cc | 22 +++++++++++-----------
src/gnome-cmd-remote-dialog.cc | 4 ++--
src/gnome-cmd-search-dialog.cc | 6 +++---
src/intviewer/image-render.cc | 12 ++++++------
src/intviewer/scroll-box.cc | 10 +++++-----
src/intviewer/text-render.cc | 13 ++++++-------
src/intviewer/viewer-widget.cc | 14 +++++++-------
src/intviewer/viewer-window.cc | 12 ++++++------
src/tags/gnome-cmd-tags-doc.cc | 18 +++++++++---------
src/utils.cc | 6 +++---
15 files changed, 71 insertions(+), 77 deletions(-)
---
diff --git a/src/eggcellrendererkeys.cc b/src/eggcellrendererkeys.cc
index c3e3de3..e26d85f 100644
--- a/src/eggcellrendererkeys.cc
+++ b/src/eggcellrendererkeys.cc
@@ -534,7 +534,7 @@ static gboolean grab_key_callback (GtkWidget *widget, GdkEventKey *event, EggCel
keys->grab_widget = NULL;
if (edited)
- g_signal_emit_by_name (G_OBJECT (keys), "accel-edited", path, accel_key, accel_mods, event->hardware_keycode);
+ g_signal_emit_by_name (keys, "accel-edited", path, accel_key, accel_mods, event->hardware_keycode);
g_free (path);
@@ -549,7 +549,7 @@ static void ungrab_stuff (GtkWidget *widget, EggCellRendererKeys *keys)
gdk_display_keyboard_ungrab (display, GDK_CURRENT_TIME);
gdk_display_pointer_ungrab (display, GDK_CURRENT_TIME);
- g_signal_handlers_disconnect_by_func (G_OBJECT (keys->grab_widget), (gpointer) G_CALLBACK (grab_key_callback), keys);
+ g_signal_handlers_disconnect_by_func (keys->grab_widget, (gpointer) G_CALLBACK (grab_key_callback), keys);
}
@@ -632,7 +632,7 @@ egg_cell_renderer_keys_start_editing (GtkCellRenderer *cell,
keys->grab_widget = widget;
- g_signal_connect (G_OBJECT (widget), "key-press-event", G_CALLBACK (grab_key_callback), keys);
+ g_signal_connect (widget, "key-press-event", G_CALLBACK (grab_key_callback), keys);
eventbox = (GtkWidget *) g_object_new (pointless_eventbox_subclass_get_type (), NULL);
keys->edit_widget = eventbox;
@@ -653,7 +653,7 @@ egg_cell_renderer_keys_start_editing (GtkCellRenderer *cell,
gtk_widget_show_all (keys->edit_widget);
- g_signal_connect (G_OBJECT (keys->edit_widget), "unrealize", G_CALLBACK (ungrab_stuff), keys);
+ g_signal_connect (keys->edit_widget, "unrealize", G_CALLBACK (ungrab_stuff), keys);
keys->edit_key = keys->accel_key;
diff --git a/src/gnome-cmd-bookmark-dialog.cc b/src/gnome-cmd-bookmark-dialog.cc
index 2c4c6fc..ddebfd5 100644
--- a/src/gnome-cmd-bookmark-dialog.cc
+++ b/src/gnome-cmd-bookmark-dialog.cc
@@ -557,16 +557,11 @@ static void init (GnomeCmdBookmarkDialog *in_dialog)
gnome_cmd_dialog_add_button (GNOME_CMD_DIALOG (dialog), GTK_STOCK_CLOSE,
GTK_SIGNAL_FUNC (on_close), dialog);
- g_signal_connect (dialog, "key-press-event",
- G_CALLBACK (on_dialog_keypress), dialog);
- g_signal_connect_after (G_OBJECT (in_dialog->priv->dir_list), "scroll-vertical",
- G_CALLBACK (on_scroll_vertical), NULL);
- g_signal_connect (in_dialog->priv->dir_list, "unselect-row",
- G_CALLBACK (on_dir_unselected), dialog);
- g_signal_connect (in_dialog->priv->dir_list, "resize-column",
- G_CALLBACK (on_column_resize), dialog);
- g_signal_connect (in_dialog->priv->combo, "item-selected",
- G_CALLBACK (on_group_combo_item_selected), dialog);
+ g_signal_connect (dialog, "key-press-event", G_CALLBACK (on_dialog_keypress), dialog);
+ g_signal_connect_after (in_dialog->priv->dir_list, "scroll-vertical", G_CALLBACK (on_scroll_vertical), NULL);
+ g_signal_connect (in_dialog->priv->dir_list, "unselect-row", G_CALLBACK (on_dir_unselected), dialog);
+ g_signal_connect (in_dialog->priv->dir_list, "resize-column", G_CALLBACK (on_column_resize), dialog);
+ g_signal_connect (in_dialog->priv->combo, "item-selected", G_CALLBACK (on_group_combo_item_selected), dialog);
gtk_widget_grab_focus (in_dialog->priv->dir_list);
}
diff --git a/src/gnome-cmd-clist.cc b/src/gnome-cmd-clist.cc
index e3c58ee..c9f2999 100644
--- a/src/gnome-cmd-clist.cc
+++ b/src/gnome-cmd-clist.cc
@@ -491,7 +491,7 @@ static void draw_row (GtkCList *clist, GdkRectangle *area, gint row, GtkCListRow
offset,
row_rectangle.y + row_center_offset + clist_row->cell[i].vertical,
layout);
- g_object_unref (G_OBJECT (layout));
+ g_object_unref (layout);
gdk_gc_set_clip_rectangle (fg_gc, NULL);
}
break;
diff --git a/src/gnome-cmd-menu-button.cc b/src/gnome-cmd-menu-button.cc
index 18403b8..5c8be2e 100644
--- a/src/gnome-cmd-menu-button.cc
+++ b/src/gnome-cmd-menu-button.cc
@@ -53,7 +53,7 @@ inline GtkWidget *create_menu_button (const gchar *stock_id, const gchar *label_
gtk_label_set_mnemonic_widget (GTK_LABEL (label), button);
gtk_widget_set_events (button, GDK_BUTTON_PRESS_MASK);
- g_signal_connect (G_OBJECT (button), "clicked", G_CALLBACK (on_menu_button_clicked), menu);
+ g_signal_connect (button, "clicked", G_CALLBACK (on_menu_button_clicked), menu);
return button;
}
diff --git a/src/gnome-cmd-prepare-xfer-dialog.cc b/src/gnome-cmd-prepare-xfer-dialog.cc
index c9a6a68..0926035 100644
--- a/src/gnome-cmd-prepare-xfer-dialog.cc
+++ b/src/gnome-cmd-prepare-xfer-dialog.cc
@@ -331,8 +331,8 @@ static void init (GnomeCmdPrepareXferDialog *dialog)
dialog->cancel_button = gnome_cmd_dialog_add_button (GNOME_CMD_DIALOG (dialog), GTK_STOCK_CANCEL, NULL, NULL);
dialog->ok_button = gnome_cmd_dialog_add_button (GNOME_CMD_DIALOG (dialog), GTK_STOCK_OK, NULL, NULL);
- g_signal_connect_after (G_OBJECT (dialog->cancel_button), "clicked", G_CALLBACK (on_cancel), dialog);
- g_signal_connect_after (G_OBJECT (dialog->ok_button), "clicked", G_CALLBACK (on_ok), dialog);
+ g_signal_connect_after (dialog->cancel_button, "clicked", G_CALLBACK (on_cancel), dialog);
+ g_signal_connect_after (dialog->ok_button, "clicked", G_CALLBACK (on_ok), dialog);
gtk_widget_set_size_request (GTK_WIDGET (dialog), 500, -1);
}
diff --git a/src/gnome-cmd-profile-component.cc b/src/gnome-cmd-profile-component.cc
index ee95374..21293a7 100644
--- a/src/gnome-cmd-profile-component.cc
+++ b/src/gnome-cmd-profile-component.cc
@@ -548,34 +548,34 @@ G_DEFINE_TYPE (GnomeCmdProfileComponent, gnome_cmd_profile_component, GTK_TYPE_V
void GnomeCmdProfileComponent::Private::on_template_entry_changed(GtkEntry *entry, GnomeCmdProfileComponent *component)
{
- g_signal_emit (G_OBJECT (component), signals[TEMPLATE_CHANGED], 0);
+ g_signal_emit (component, signals[TEMPLATE_CHANGED], 0);
}
void GnomeCmdProfileComponent::Private::on_counter_start_spin_value_changed (GtkWidget *spin, GnomeCmdProfileComponent *component)
{
component->profile.counter_start = gtk_spin_button_get_value_as_int (GTK_SPIN_BUTTON (spin));
- g_signal_emit (G_OBJECT (component), signals[COUNTER_CHANGED], 0);
+ g_signal_emit (component, signals[COUNTER_CHANGED], 0);
}
void GnomeCmdProfileComponent::Private::on_counter_step_spin_value_changed (GtkWidget *spin, GnomeCmdProfileComponent *component)
{
component->profile.counter_step = gtk_spin_button_get_value_as_int (GTK_SPIN_BUTTON (spin));
- g_signal_emit (G_OBJECT (component), signals[COUNTER_CHANGED], 0);
+ g_signal_emit (component, signals[COUNTER_CHANGED], 0);
}
void GnomeCmdProfileComponent::Private::on_counter_digits_spin_value_changed (GtkWidget *spin, GnomeCmdProfileComponent *component)
{
component->profile.counter_width = gtk_spin_button_get_value_as_int (GTK_SPIN_BUTTON (spin));
- g_signal_emit (G_OBJECT (component), signals[COUNTER_CHANGED], 0);
+ g_signal_emit (component, signals[COUNTER_CHANGED], 0);
}
void GnomeCmdProfileComponent::Private::on_regex_model_row_deleted (GtkTreeModel *treemodel, GtkTreePath *path, GnomeCmdProfileComponent *component)
{
- g_signal_emit (G_OBJECT (component), signals[REGEX_CHANGED], 0);
+ g_signal_emit (component, signals[REGEX_CHANGED], 0);
}
@@ -596,7 +596,7 @@ void GnomeCmdProfileComponent::Private::on_regex_add_btn_clicked (GtkButton *but
COL_MATCH_CASE, rx->match_case ? _("Yes") : _("No"),
-1);
- g_signal_emit (G_OBJECT (component), signals[REGEX_CHANGED], 0);
+ g_signal_emit (component, signals[REGEX_CHANGED], 0);
gtk_widget_set_sensitive (component->priv->regex_edit_button, TRUE);
gtk_widget_set_sensitive (component->priv->regex_remove_button, TRUE);
@@ -628,7 +628,7 @@ void GnomeCmdProfileComponent::Private::on_regex_edit_btn_clicked (GtkButton *bu
COL_MATCH_CASE, rx->match_case ? _("Yes") : _("No"),
-1);
- g_signal_emit (G_OBJECT (component), signals[REGEX_CHANGED], 0);
+ g_signal_emit (component, signals[REGEX_CHANGED], 0);
}
}
}
@@ -665,7 +665,7 @@ void GnomeCmdProfileComponent::Private::on_regex_remove_all_btn_clicked (GtkButt
gtk_list_store_clear (GTK_LIST_STORE (component->priv->regex_model));
g_signal_handlers_unblock_by_func (component->priv->regex_model, gpointer (on_regex_model_row_deleted), component);
- g_signal_emit (G_OBJECT (component), signals[REGEX_CHANGED], 0);
+ g_signal_emit (component, signals[REGEX_CHANGED], 0);
gtk_widget_set_sensitive (component->priv->regex_edit_button, FALSE);
gtk_widget_set_sensitive (component->priv->regex_remove_button, FALSE);
@@ -697,7 +697,7 @@ void GnomeCmdProfileComponent::Private::on_case_combo_changed (GtkComboBox *comb
}
component->profile.case_conversion = item;
- g_signal_emit (G_OBJECT (component), signals[REGEX_CHANGED], 0);
+ g_signal_emit (component, signals[REGEX_CHANGED], 0);
}
@@ -717,7 +717,7 @@ void GnomeCmdProfileComponent::Private::on_trim_combo_changed (GtkComboBox *comb
}
component->profile.trim_blanks = item;
- g_signal_emit (G_OBJECT (component), signals[REGEX_CHANGED], 0);
+ g_signal_emit (component, signals[REGEX_CHANGED], 0);
}
@@ -1140,7 +1140,7 @@ void GnomeCmdProfileComponent::update()
gtk_combo_box_set_active (GTK_COMBO_BOX (priv->case_combo), profile.case_conversion);
gtk_combo_box_set_active (GTK_COMBO_BOX (priv->trim_combo), profile.trim_blanks);
- g_signal_emit (G_OBJECT (this), signals[REGEX_CHANGED], 0);
+ g_signal_emit (this, signals[REGEX_CHANGED], 0);
}
diff --git a/src/gnome-cmd-remote-dialog.cc b/src/gnome-cmd-remote-dialog.cc
index 20f3d0f..71cd7c3 100644
--- a/src/gnome-cmd-remote-dialog.cc
+++ b/src/gnome-cmd-remote-dialog.cc
@@ -501,8 +501,8 @@ static void init (GnomeCmdRemoteDialog *ftp_dialog)
GtkTreeModel *model = gtk_tree_view_get_model (GTK_TREE_VIEW (ftp_dialog->priv->connection_list));
- g_signal_connect (G_OBJECT (model), "row-inserted", G_CALLBACK (on_list_row_inserted), dialog);
- g_signal_connect (G_OBJECT (model), "row-deleted", G_CALLBACK (on_list_row_deleted), dialog);
+ g_signal_connect (model, "row-inserted", G_CALLBACK (on_list_row_inserted), dialog);
+ g_signal_connect (model, "row-deleted", G_CALLBACK (on_list_row_deleted), dialog);
gtk_widget_grab_focus (ftp_dialog->priv->connection_list);
}
diff --git a/src/gnome-cmd-search-dialog.cc b/src/gnome-cmd-search-dialog.cc
index 00152fa..78eb004 100644
--- a/src/gnome-cmd-search-dialog.cc
+++ b/src/gnome-cmd-search-dialog.cc
@@ -925,9 +925,9 @@ static void init (GnomeCmdSearchDialog *dialog)
dialog->priv->pbar = pbar;
- g_signal_connect (G_OBJECT (dialog), "destroy", G_CALLBACK (on_dialog_destroy), NULL);
- g_signal_connect (G_OBJECT (dialog), "size-allocate", G_CALLBACK (on_dialog_size_allocate), NULL);
- g_signal_connect (G_OBJECT (dialog->priv->result_list), "key-press-event", G_CALLBACK (on_list_keypressed), dialog);
+ g_signal_connect (dialog, "destroy", G_CALLBACK (on_dialog_destroy), NULL);
+ g_signal_connect (dialog, "size-allocate", G_CALLBACK (on_dialog_size_allocate), NULL);
+ g_signal_connect (dialog->priv->result_list, "key-press-event", G_CALLBACK (on_list_keypressed), dialog);
g_signal_connect (dialog->priv->find_text_check, "toggled", G_CALLBACK (find_text_toggled), dialog);
diff --git a/src/intviewer/image-render.cc b/src/intviewer/image-render.cc
index 10684a2..ceca5b1 100644
--- a/src/intviewer/image-render.cc
+++ b/src/intviewer/image-render.cc
@@ -708,11 +708,11 @@ static void image_render_free_pixbuf (ImageRender *obj)
obj->priv->scaled_pixbuf_loaded = FALSE;
if (obj->priv->orig_pixbuf)
- g_object_unref (G_OBJECT (obj->priv->orig_pixbuf));
+ g_object_unref (obj->priv->orig_pixbuf);
obj->priv->orig_pixbuf = NULL;
if (obj->priv->disp_pixbuf)
- g_object_unref (G_OBJECT (obj->priv->disp_pixbuf));
+ g_object_unref (obj->priv->disp_pixbuf);
obj->priv->disp_pixbuf = NULL;
g_free (obj->priv->filename);
@@ -729,7 +729,7 @@ static gpointer image_render_pixbuf_loading_thread (gpointer data)
g_atomic_int_inc (&obj->priv->orig_pixbuf_loaded);
- g_object_unref (G_OBJECT (obj));
+ g_object_unref (obj);
return NULL;
}
@@ -800,7 +800,7 @@ inline void image_render_start_background_pixbuf_loading (ImageRender *obj)
obj->priv->orig_pixbuf_loaded = 0;
// Start background loading
- g_object_ref (G_OBJECT (obj));
+ g_object_ref (obj);
obj->priv->pixbuf_loading_thread = g_thread_create(image_render_pixbuf_loading_thread, (gpointer) obj, FALSE, NULL);
}
@@ -833,7 +833,7 @@ static void image_render_prepare_disp_pixbuf (ImageRender *obj)
return;
if (obj->priv->disp_pixbuf)
- g_object_unref (G_OBJECT (obj->priv->disp_pixbuf));
+ g_object_unref (obj->priv->disp_pixbuf);
obj->priv->disp_pixbuf = NULL;
if (gdk_pixbuf_get_height(obj->priv->orig_pixbuf)==0)
@@ -847,7 +847,7 @@ static void image_render_prepare_disp_pixbuf (ImageRender *obj)
// no need to scale down
obj->priv->disp_pixbuf = obj->priv->orig_pixbuf;
- g_object_ref (G_OBJECT (obj->priv->disp_pixbuf));
+ g_object_ref (obj->priv->disp_pixbuf);
return;
}
diff --git a/src/intviewer/scroll-box.cc b/src/intviewer/scroll-box.cc
index 7f2777f..e7af419 100644
--- a/src/intviewer/scroll-box.cc
+++ b/src/intviewer/scroll-box.cc
@@ -119,8 +119,8 @@ static void scroll_box_init (ScrollBox *w)
(GtkAttachOptions) (GTK_FILL), 0, 0);
w->priv->client = NULL;
- g_signal_connect(G_OBJECT (w), "button-press-event", G_CALLBACK(scroll_box_button_press), (gpointer) w);
- g_signal_connect(G_OBJECT (w), "destroy-event", G_CALLBACK(scroll_box_destroy), (gpointer) w);
+ g_signal_connect(w, "button-press-event", G_CALLBACK(scroll_box_button_press), w);
+ g_signal_connect(w, "destroy-event", G_CALLBACK(scroll_box_destroy), w);
}
@@ -134,7 +134,7 @@ static void scroll_box_destroy (GtkObject *widget)
if (w->priv)
{
if (w->priv->client)
- g_object_unref (G_OBJECT (w->priv->client));
+ g_object_unref (w->priv->client);
w->priv->client=NULL;
g_free(w->priv);
@@ -176,11 +176,11 @@ void scroll_box_set_client (ScrollBox *obj, GtkWidget *client)
if (obj->priv->client)
{
if (obj->priv->client)
- g_object_unref (G_OBJECT (obj->priv->client));
+ g_object_unref (obj->priv->client);
obj->priv->client = NULL;
}
- g_object_ref (G_OBJECT (client));
+ g_object_ref (client);
gtk_widget_show (client);
obj->priv->client = client;
gtk_table_attach (GTK_TABLE (obj), client , 0, 1, 0, 1,
diff --git a/src/intviewer/text-render.cc b/src/intviewer/text-render.cc
index 473fcc8..ffdc85c 100644
--- a/src/intviewer/text-render.cc
+++ b/src/intviewer/text-render.cc
@@ -324,7 +324,7 @@ static void text_render_init (TextRender *w)
w->priv->fixed_font_name = g_strdup ("Monospace");
- g_signal_connect(G_OBJECT (w), "key-press-event", G_CALLBACK (text_render_key_pressed), NULL);
+ g_signal_connect(w, "key-press-event", G_CALLBACK (text_render_key_pressed), NULL);
w->priv->layout = gtk_widget_create_pango_layout(GTK_WIDGET (w), NULL);
@@ -1045,8 +1045,7 @@ void text_render_attach_external_v_range(TextRender *obj, GtkRange *range)
g_return_if_fail (IS_TEXT_RENDER(obj));
g_return_if_fail (range!=NULL);
- g_signal_connect (G_OBJECT (range), "change-value",
- G_CALLBACK (text_render_vscroll_change_value), (gpointer)obj);
+ g_signal_connect (range, "change-value", G_CALLBACK (text_render_vscroll_change_value), obj);
}
@@ -1073,8 +1072,8 @@ static PangoFontMetrics *load_font (const char *font_name)
PangoFontMetrics *new_metrics = pango_font_get_metrics (new_font, pango_context_get_language (context));
pango_font_description_free (new_desc);
- g_object_unref (G_OBJECT (context));
- g_object_unref (G_OBJECT (new_font));
+ g_object_unref (context);
+ g_object_unref (new_font);
return new_metrics;
}
@@ -1105,7 +1104,7 @@ static guint get_max_char_width(GtkWidget *widget, PangoFontDescription *font_de
maxwidth = MAX(maxwidth, logical_rect.width);
}
- g_object_unref (G_OBJECT (layout));
+ g_object_unref (layout);
return maxwidth;
}
@@ -1144,7 +1143,7 @@ static guint text_render_filter_undisplayable_chars(TextRender *obj)
gv_input_mode_update_utf8_translation(obj->priv->im, i, '.');
}
- g_object_unref (G_OBJECT (layout));
+ g_object_unref (layout);
return 0;
}
diff --git a/src/intviewer/viewer-widget.cc b/src/intviewer/viewer-widget.cc
index 080b2ef..6e9f589 100644
--- a/src/intviewer/viewer-widget.cc
+++ b/src/intviewer/viewer-widget.cc
@@ -171,7 +171,7 @@ static void gviewer_init (GViewer *w)
scroll_box_set_client (SCROLL_BOX(w->priv->tscrollbox), GTK_WIDGET (w->priv->textr));
gtk_widget_show (GTK_WIDGET (w->priv->textr));
gtk_widget_show (w->priv->tscrollbox);
- g_object_ref (G_OBJECT (w->priv->tscrollbox));
+ g_object_ref (w->priv->tscrollbox);
w->priv->imgr = (ImageRender *) image_render_new();
gviewer_set_best_fit(w, DEFAULT_BEST_FIT);
@@ -184,17 +184,17 @@ static void gviewer_init (GViewer *w)
scroll_box_set_client (SCROLL_BOX(w->priv->iscrollbox), GTK_WIDGET (w->priv->imgr));
gtk_widget_show (GTK_WIDGET (w->priv->imgr));
gtk_widget_show (w->priv->iscrollbox);
- g_object_ref (G_OBJECT (w->priv->iscrollbox));
+ g_object_ref (w->priv->iscrollbox);
w->priv->last_client = w->priv->tscrollbox;
gtk_table_attach (GTK_TABLE(w), GTK_WIDGET (w->priv->tscrollbox), 0, 1, 0, 1,
(GtkAttachOptions)(GTK_FILL|GTK_EXPAND),
(GtkAttachOptions)(GTK_FILL|GTK_EXPAND), 0, 0);
- g_signal_connect (G_OBJECT (w), "destroy-event", G_CALLBACK (gviewer_destroy), (gpointer) w);
+ g_signal_connect (w, "destroy-event", G_CALLBACK (gviewer_destroy), w);
- g_signal_connect (G_OBJECT (w->priv->textr), "text-status-changed", G_CALLBACK (gviewer_text_status_update), (gpointer) w);
- g_signal_connect (G_OBJECT (w->priv->imgr), "image-status-changed", G_CALLBACK (gviewer_image_status_update), (gpointer) w);
+ g_signal_connect (w->priv->textr, "text-status-changed", G_CALLBACK (gviewer_text_status_update), w);
+ g_signal_connect (w->priv->imgr, "image-status-changed", G_CALLBACK (gviewer_image_status_update), w);
}
@@ -259,8 +259,8 @@ static void gviewer_destroy (GtkObject *widget)
if (w->priv)
{
- g_object_unref (G_OBJECT (w->priv->iscrollbox));
- g_object_unref (G_OBJECT (w->priv->tscrollbox));
+ g_object_unref (w->priv->iscrollbox);
+ g_object_unref (w->priv->tscrollbox);
g_free (w->priv);
w->priv = NULL;
diff --git a/src/intviewer/viewer-window.cc b/src/intviewer/viewer-window.cc
index 90e777c..781b7e1 100644
--- a/src/intviewer/viewer-window.cc
+++ b/src/intviewer/viewer-window.cc
@@ -232,7 +232,7 @@ static void gviewer_window_init (GViewerWindow *w)
GtkWindow *win = GTK_WINDOW (w);
gtk_window_set_title(win, "GViewer");
- g_signal_connect(G_OBJECT (w), "key-press-event", G_CALLBACK (gviewer_window_key_pressed), NULL);
+ g_signal_connect(w, "key-press-event", G_CALLBACK (gviewer_window_key_pressed), NULL);
w->priv->vbox = gtk_vbox_new (FALSE, 0);
gtk_widget_show (w->priv->vbox);
@@ -242,11 +242,11 @@ static void gviewer_window_init (GViewerWindow *w)
gtk_box_pack_start (GTK_BOX (w->priv->vbox), w->priv->menubar, FALSE, FALSE, 0);
w->priv->viewer = (GViewer *) gviewer_new();
- g_object_ref (G_OBJECT (w->priv->viewer));
+ g_object_ref (w->priv->viewer);
gtk_widget_show (GTK_WIDGET (w->priv->viewer));
gtk_box_pack_start (GTK_BOX (w->priv->vbox), GTK_WIDGET (w->priv->viewer), TRUE, TRUE, 0);
- g_signal_connect(G_OBJECT (w->priv->viewer), "status-line-changed", G_CALLBACK (gviewer_window_status_line_changed), (gpointer) w);
+ g_signal_connect(w->priv->viewer, "status-line-changed", G_CALLBACK (gviewer_window_status_line_changed), w);
w->priv->statusbar = gtk_statusbar_new ();
gtk_widget_show (w->priv->statusbar);
@@ -365,7 +365,7 @@ static void gviewer_window_destroy (GtkObject *widget)
if (w->priv)
{
- g_object_unref (G_OBJECT (w->priv->viewer));
+ g_object_unref (w->priv->viewer);
g_free (w->priv->filename);
w->priv->filename = NULL;
@@ -538,7 +538,7 @@ static GtkWidget *create_menu_item (MENUITEMTYPE type,
if (accel && keyval)
gtk_widget_add_accelerator (menuitem, "activate", accel, keyval, (GdkModifierType) modifier, GTK_ACCEL_VISIBLE);
- g_signal_connect (G_OBJECT (menuitem), "activate", callback, userdata);
+ g_signal_connect (menuitem, "activate", callback, userdata);
return menuitem;
}
@@ -559,7 +559,7 @@ static GtkWidget *create_radio_menu_item (GSList **group,
if (accel && keyval)
gtk_widget_add_accelerator (menuitem, "activate", accel, keyval, (GdkModifierType) modifier, GTK_ACCEL_VISIBLE);
- g_signal_connect (G_OBJECT (menuitem), "activate", callback, userdata);
+ g_signal_connect (menuitem, "activate", callback, userdata);
gtk_widget_show (menuitem);
gtk_container_add (GTK_CONTAINER (container), menuitem);
diff --git a/src/tags/gnome-cmd-tags-doc.cc b/src/tags/gnome-cmd-tags-doc.cc
index 3a859c9..4e7a8e4 100644
--- a/src/tags/gnome-cmd-tags-doc.cc
+++ b/src/tags/gnome-cmd-tags-doc.cc
@@ -255,7 +255,7 @@ inline void process_opendoc_infile(GsfInfile *infile, GnomeCmdFileMetadata *meta
else
g_error_free (err);
- g_object_unref (G_OBJECT (sections));
+ g_object_unref (sections);
}
@@ -269,7 +269,7 @@ inline void process_msole_summary(GsfInput *input, GnomeCmdFileMetadata *metadat
else
g_error_free (err);
- g_object_unref (G_OBJECT (sections));
+ g_object_unref (sections);
}
@@ -324,7 +324,7 @@ inline void process_msole_infile(GsfInfile *infile, GnomeCmdFileMetadata *metada
// if (src)
// {
// process_msole_summary (src, metadata);
- // g_object_unref (G_OBJECT(src));
+ // g_object_unref (src);
// }
// src = gsf_infile_child_by_name (infile, "\005DocumentSummaryInformation");
@@ -332,7 +332,7 @@ inline void process_msole_infile(GsfInfile *infile, GnomeCmdFileMetadata *metada
// if (src)
// {
// process_msole_summary (src, metadata);
- // g_object_unref (G_OBJECT(src));
+ // g_object_unref (src);
// }
// src = gsf_infile_child_by_name (infile, "SfxDocumentInfo");
@@ -340,7 +340,7 @@ inline void process_msole_infile(GsfInfile *infile, GnomeCmdFileMetadata *metada
// if (src)
// {
// process_msole_SO (src, metadata);
- // g_object_unref (G_OBJECT(src));
+ // g_object_unref (src);
// }
for (gint i=0; i<gsf_infile_num_children (infile); i++)
@@ -359,7 +359,7 @@ inline void process_msole_infile(GsfInfile *infile, GnomeCmdFileMetadata *metada
if (src)
{
process_msole_summary (src, metadata);
- g_object_unref (G_OBJECT (src));
+ g_object_unref (src);
}
continue;
@@ -372,7 +372,7 @@ inline void process_msole_infile(GsfInfile *infile, GnomeCmdFileMetadata *metada
if (src)
{
process_msole_SO (src, metadata);
- g_object_unref (G_OBJECT (src));
+ g_object_unref (src);
}
continue;
@@ -498,11 +498,11 @@ void gcmd_tags_libgsf_load_metadata(GnomeCmdFile *f)
process_opendoc_infile(infile, f->metadata);
if (infile)
- g_object_unref (G_OBJECT (infile));
+ g_object_unref (infile);
if (err)
g_error_free (err);
- g_object_unref (G_OBJECT (input));
+ g_object_unref (input);
#endif
}
diff --git a/src/utils.cc b/src/utils.cc
index 6da5625..546f250 100644
--- a/src/utils.cc
+++ b/src/utils.cc
@@ -1085,7 +1085,7 @@ inline GtkWidget *scale_pixbuf (GdkPixbuf *pixbuf, GtkIconSize icon_size)
(height/ greatest) * pix_y,
GDK_INTERP_BILINEAR);
GtkWidget *image = gtk_image_new_from_pixbuf (scaled);
- g_object_unref (G_OBJECT (scaled));
+ g_object_unref (scaled);
return image;
}
@@ -1113,7 +1113,7 @@ GtkWidget *create_ui_pixmap (GtkWidget *unused, GnomeUIPixmapType pixmap_type, g
if (pixbuf != NULL)
{
pixmap = scale_pixbuf (pixbuf, icon_size);
- g_object_unref (G_OBJECT (pixbuf));
+ g_object_unref (pixbuf);
}
}
break;
@@ -1131,7 +1131,7 @@ GtkWidget *create_ui_pixmap (GtkWidget *unused, GnomeUIPixmapType pixmap_type, g
{
GdkPixbuf *pixbuf = gdk_pixbuf_new_from_file (name, NULL);
pixmap = scale_pixbuf (pixbuf, icon_size);
- g_object_unref (G_OBJECT (pixbuf));
+ g_object_unref (pixbuf);
g_free (name);
}
break;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]