summaryrefslogtreecommitdiffstats
path: root/views/controls
diff options
context:
space:
mode:
authorerg@chromium.org <erg@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-02-10 17:47:41 +0000
committererg@chromium.org <erg@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-02-10 17:47:41 +0000
commite5a2acec061119fab8f5b0a05e79702ae03670dc (patch)
tree24cfd3e9144b9116a060187e5525d21e74363117 /views/controls
parent4f0872bb0ff3bfaca9f765c64a6d76598daf4ed4 (diff)
downloadchromium_src-e5a2acec061119fab8f5b0a05e79702ae03670dc.zip
chromium_src-e5a2acec061119fab8f5b0a05e79702ae03670dc.tar.gz
chromium_src-e5a2acec061119fab8f5b0a05e79702ae03670dc.tar.bz2
Remove redundant casts in g_signal_connect() throughout all gtk code we have.
BUG=none TEST=none Review URL: http://codereview.chromium.org/600033 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@38629 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'views/controls')
-rw-r--r--views/controls/button/native_button_gtk.cc8
-rw-r--r--views/controls/combobox/native_combobox_gtk.cc2
-rw-r--r--views/controls/menu/native_menu_gtk.cc5
-rw-r--r--views/controls/native/native_view_host_gtk.cc4
-rw-r--r--views/controls/native_control_gtk.cc2
-rw-r--r--views/controls/scrollbar/native_scroll_bar_gtk.cc5
-rw-r--r--views/controls/tabbed_pane/native_tabbed_pane_gtk.cc2
7 files changed, 13 insertions, 15 deletions
diff --git a/views/controls/button/native_button_gtk.cc b/views/controls/button/native_button_gtk.cc
index 79314a8..c42bfbf 100644
--- a/views/controls/button/native_button_gtk.cc
+++ b/views/controls/button/native_button_gtk.cc
@@ -93,7 +93,7 @@ gfx::Size NativeButtonGtk::GetPreferredSize() {
void NativeButtonGtk::CreateNativeControl() {
GtkWidget* widget = gtk_button_new();
- g_signal_connect(G_OBJECT(widget), "clicked",
+ g_signal_connect(widget, "clicked",
G_CALLBACK(CallClicked), this);
// Any push button can become the default button.
@@ -137,7 +137,7 @@ Checkbox* NativeCheckboxGtk::checkbox() {
void NativeCheckboxGtk::CreateNativeControl() {
GtkWidget* widget = gtk_check_button_new();
- g_signal_connect(G_OBJECT(widget), "clicked",
+ g_signal_connect(widget, "clicked",
G_CALLBACK(CallClicked), this);
NativeControlCreated(widget);
}
@@ -189,9 +189,9 @@ RadioButton* NativeRadioButtonGtk::radio_button() {
void NativeRadioButtonGtk::CreateNativeControl() {
GtkWidget* widget = gtk_radio_button_new(NULL);
- g_signal_connect(G_OBJECT(widget), "clicked",
+ g_signal_connect(widget, "clicked",
G_CALLBACK(CallClicked), this);
- g_signal_connect(G_OBJECT(widget), "toggled",
+ g_signal_connect(widget, "toggled",
G_CALLBACK(CallToggled), this);
NativeControlCreated(widget);
}
diff --git a/views/controls/combobox/native_combobox_gtk.cc b/views/controls/combobox/native_combobox_gtk.cc
index a4ff24ce..581fea3 100644
--- a/views/controls/combobox/native_combobox_gtk.cc
+++ b/views/controls/combobox/native_combobox_gtk.cc
@@ -110,7 +110,7 @@ void NativeComboboxGtk::CreateNativeControl() {
gtk_cell_layout_pack_start(GTK_CELL_LAYOUT(widget), cell, TRUE);
gtk_cell_layout_set_attributes(
GTK_CELL_LAYOUT(widget), cell, "text", 0, NULL);
- g_signal_connect(G_OBJECT(widget), "changed",
+ g_signal_connect(widget, "changed",
G_CALLBACK(CallChanged), this);
NativeControlCreated(widget);
diff --git a/views/controls/menu/native_menu_gtk.cc b/views/controls/menu/native_menu_gtk.cc
index c1c2d22..144111a 100644
--- a/views/controls/menu/native_menu_gtk.cc
+++ b/views/controls/menu/native_menu_gtk.cc
@@ -100,7 +100,7 @@ void NativeMenuGtk::RunMenuAt(const gfx::Point& point, int alignment) {
// Listen for "hide" signal so that we know when to return from the blocking
// RunMenuAt call.
gint handle_id =
- g_signal_connect(G_OBJECT(menu_), "hide", G_CALLBACK(OnMenuHidden), this);
+ g_signal_connect(menu_, "hide", G_CALLBACK(OnMenuHidden), this);
// Block until menu is no longer shown by running a nested message loop.
MessageLoopForUI::current()->Run(NULL);
@@ -228,8 +228,7 @@ GtkWidget* NativeMenuGtk::AddMenuItemAt(int index,
}
g_object_set_data(G_OBJECT(menu_item), kPositionString,
reinterpret_cast<void*>(index));
- g_signal_connect(G_OBJECT(menu_item), "activate", G_CALLBACK(CallActivate),
- this);
+ g_signal_connect(menu_item, "activate", G_CALLBACK(CallActivate), this);
gtk_widget_show(menu_item);
gtk_menu_append(menu_, menu_item);
diff --git a/views/controls/native/native_view_host_gtk.cc b/views/controls/native/native_view_host_gtk.cc
index e8862e0..9b390e9 100644
--- a/views/controls/native/native_view_host_gtk.cc
+++ b/views/controls/native/native_view_host_gtk.cc
@@ -111,13 +111,13 @@ void NativeViewHostGtk::NativeViewAttached() {
gtk_container_add(GTK_CONTAINER(fixed_), host_->native_view());
if (!destroy_signal_id_) {
- destroy_signal_id_ = g_signal_connect(G_OBJECT(host_->native_view()),
+ destroy_signal_id_ = g_signal_connect(host_->native_view(),
"destroy", G_CALLBACK(CallDestroy),
this);
}
if (!focus_signal_id_) {
- focus_signal_id_ = g_signal_connect(G_OBJECT(host_->native_view()),
+ focus_signal_id_ = g_signal_connect(host_->native_view(),
"focus-in-event",
G_CALLBACK(CallFocusIn), this);
}
diff --git a/views/controls/native_control_gtk.cc b/views/controls/native_control_gtk.cc
index 66e6994..6857d48 100644
--- a/views/controls/native_control_gtk.cc
+++ b/views/controls/native_control_gtk.cc
@@ -75,7 +75,7 @@ void NativeControlGtk::NativeControlCreated(GtkWidget* native_control) {
gtk_widget_set_sensitive(native_view(), IsEnabled());
// Listen for focus change event to update the FocusManager focused view.
- g_signal_connect(G_OBJECT(native_control), "focus-in-event",
+ g_signal_connect(native_control, "focus-in-event",
G_CALLBACK(CallFocusIn), this);
}
diff --git a/views/controls/scrollbar/native_scroll_bar_gtk.cc b/views/controls/scrollbar/native_scroll_bar_gtk.cc
index 616ff7f..30d714a 100644
--- a/views/controls/scrollbar/native_scroll_bar_gtk.cc
+++ b/views/controls/scrollbar/native_scroll_bar_gtk.cc
@@ -104,7 +104,7 @@ void NativeScrollBarGtk::CreateNativeControl() {
gtk_range_set_update_policy(GTK_RANGE(widget), GTK_UPDATE_CONTINUOUS);
- g_signal_connect(G_OBJECT(adj), "value-changed",
+ g_signal_connect(adj, "value-changed",
G_CALLBACK(CallValueChanged), this);
NativeControlCreated(widget);
@@ -148,8 +148,7 @@ void NativeScrollBarGtk::Update(int viewport_size,
step, page,
viewport_size);
gtk_range_set_adjustment(GTK_RANGE(native_view()), GTK_ADJUSTMENT(adj));
- g_signal_connect(G_OBJECT(adj), "value-changed",
- G_CALLBACK(CallValueChanged), this);
+ g_signal_connect(adj, "value-changed", G_CALLBACK(CallValueChanged), this);
}
////////////////////////////////////////////////////////////////////////////////
diff --git a/views/controls/tabbed_pane/native_tabbed_pane_gtk.cc b/views/controls/tabbed_pane/native_tabbed_pane_gtk.cc
index eb8f5f2..110a688 100644
--- a/views/controls/tabbed_pane/native_tabbed_pane_gtk.cc
+++ b/views/controls/tabbed_pane/native_tabbed_pane_gtk.cc
@@ -113,7 +113,7 @@ gfx::NativeView NativeTabbedPaneGtk::GetTestingHandle() const {
void NativeTabbedPaneGtk::CreateNativeControl() {
GtkWidget* widget = gtk_notebook_new();
gtk_notebook_set_tab_pos(GTK_NOTEBOOK(widget), GTK_POS_TOP);
- g_signal_connect(G_OBJECT(widget), "switch-page",
+ g_signal_connect(widget, "switch-page",
G_CALLBACK(CallSwitchPage), this);
NativeControlCreated(widget);
}