]> git.saurik.com Git - wxWidgets.git/commitdiff
remove redundant GTK_WIDGET casts
authorPaul Cornett <paulcor@bullseye.com>
Sat, 21 Apr 2007 17:02:29 +0000 (17:02 +0000)
committerPaul Cornett <paulcor@bullseye.com>
Sat, 21 Apr 2007 17:02:29 +0000 (17:02 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@45560 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

15 files changed:
src/gtk/animate.cpp
src/gtk/clipbrd.cpp
src/gtk/clrpicker.cpp
src/gtk/collpane.cpp
src/gtk/combobox.cpp
src/gtk/dnd.cpp
src/gtk/filepicker.cpp
src/gtk/fontpicker.cpp
src/gtk/frame.cpp
src/gtk/hyperlink.cpp
src/gtk/menu.cpp
src/gtk/popupwin.cpp
src/gtk/scrolbar.cpp
src/gtk/toplevel.cpp
src/gtk/window.cpp

index 2999905883cff346d685801b0336b0416e269408..3d236e57ee8cc2887f93be7e06486330b278907c 100644 (file)
@@ -212,7 +212,7 @@ bool wxAnimationCtrl::Create( wxWindow *parent, wxWindowID id,
     SetWindowStyle(style);
 
     m_widget = gtk_image_new();
-    gtk_widget_show( GTK_WIDGET(m_widget) );
+    gtk_widget_show(m_widget);
 
     m_parent->DoAddChild( this );
 
index 143a624fdcde786a552f28cdfac55d00796546a9..483b6beca4889861019d77c3cc6e1c27cb973eb4 100644 (file)
@@ -439,7 +439,7 @@ void wxClipboard::AddSupportedTarget(GdkAtom atom)
 {
     gtk_selection_add_target
     (
-        GTK_WIDGET(m_clipboardWidget),
+        m_clipboardWidget,
         GTKGetClipboardAtom(),
         atom,
         0 // info (same as client data) unused
index a710f9fa336f7f8df99f13cbbd4a856d3e81b4d9..e90fb97c5be897efc779239358719b126caf98f2 100644 (file)
@@ -72,7 +72,7 @@ bool wxColourButton::Create( wxWindow *parent, wxWindowID id,
 
         m_colour = col;
         m_widget = gtk_color_button_new_with_color( m_colour.GetColor() );
-        gtk_widget_show( GTK_WIDGET(m_widget) );
+        gtk_widget_show(m_widget);
 
         // GtkColourButton signals
         g_signal_connect(m_widget, "color-set",
index 3ba9f7e25fe4f700671b80b55b2521c96795a412..277601c171a72dd0b5f85fbfe0aa55a56c12c978 100644 (file)
@@ -225,7 +225,7 @@ bool wxCollapsiblePane::Create(wxWindow *parent,
     m_pPane = new wxPanel(this, wxID_ANY, wxDefaultPosition, wxDefaultSize,
                            wxTAB_TRAVERSAL|wxNO_BORDER);
 
-    gtk_widget_show( GTK_WIDGET(m_widget) );
+    gtk_widget_show(m_widget);
     m_parent->DoAddChild( this );
 
     PostCreation(size);
index 1a10d9b3669b8c6ef54370d5c1b1aba54a801357..807fdf895be61f671d357d828a911e5317482486 100644 (file)
@@ -426,9 +426,9 @@ int wxComboBox::DoAppend( const wxString &item )
         GtkRcStyle *style = CreateWidgetStyle();
         if (style)
         {
-            gtk_widget_modify_style( GTK_WIDGET( list_item ), style );
+            gtk_widget_modify_style(list_item, style);
             GtkBin *bin = GTK_BIN( list_item );
-            GtkWidget *label = GTK_WIDGET( bin->child );
+            GtkWidget *label = bin->child;
             gtk_widget_modify_style( label, style );
             gtk_rc_style_unref( style );
         }
index 9fd807bddb3944b570493e1d16b830d5a88d6ef3..c995a53350540539662f9447732e92b362aee5e8 100644 (file)
@@ -778,7 +778,7 @@ void wxDropSource::PrepareIcon( int action, GdkDragContext *context )
 
     m_iconWindow = gtk_window_new (GTK_WINDOW_POPUP);
     gtk_widget_set_events (m_iconWindow, GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK);
-    gtk_widget_set_app_paintable (GTK_WIDGET (m_iconWindow), TRUE);
+    gtk_widget_set_app_paintable (m_iconWindow, TRUE);
 
     gtk_widget_pop_colormap ();
 
index 32d0c628080ac0150ec14ea747b79708ecb3507f..01702dd37c195c8b360413e833e6bfe3b303a389 100644 (file)
@@ -81,7 +81,7 @@ bool wxFileButton::Create( wxWindow *parent, wxWindowID id,
         // NOTE: we deliberately ignore the given label as GtkFileChooserButton
         //       use as label the currently selected file
         m_widget = gtk_file_chooser_button_new_with_dialog( m_dialog->m_widget );
-        gtk_widget_show( GTK_WIDGET(m_widget) );
+        gtk_widget_show(m_widget);
 
         // we need to know when the dialog has been dismissed clicking OK...
         // NOTE: the "clicked" signal is not available for a GtkFileChooserButton
@@ -230,7 +230,7 @@ bool wxDirButton::Create( wxWindow *parent, wxWindowID id,
         //       use as label the currently selected file
         m_widget = gtk_file_chooser_button_new_with_dialog( m_dialog->m_widget );
 
-        gtk_widget_show( GTK_WIDGET(m_widget) );
+        gtk_widget_show(m_widget);
 
         // GtkFileChooserButton signals
         g_signal_connect(m_widget, "current-folder-changed",
index 97102051c86dee3af7d11986d48e3b68abe2eaf4..325280de300e1b44719f4b92f64515211ed24357 100644 (file)
@@ -84,7 +84,7 @@ bool wxFontButton::Create( wxWindow *parent, wxWindowID id,
         gtk_font_button_set_use_size(GTK_FONT_BUTTON(m_widget), usefont);
         gtk_font_button_set_use_font(GTK_FONT_BUTTON(m_widget), usefont);
 
-        gtk_widget_show( GTK_WIDGET(m_widget) );
+        gtk_widget_show(m_widget);
 
         // GtkFontButton signals
         g_signal_connect(m_widget, "font-set",
index 0e3732b33a629c7df4f8164629e078668bda2016..feaf71767fbc39e4dc31c4ea9773ce410887d839 100644 (file)
@@ -133,7 +133,7 @@ static void wxInsertChildInFrame( wxFrame* parent, wxWindow* child )
         // These are outside the client area
         wxFrame* frame = (wxFrame*) parent;
         gtk_pizza_put( GTK_PIZZA(frame->m_mainWidget),
-                         GTK_WIDGET(child->m_widget),
+                         child->m_widget,
                          child->m_x,
                          child->m_y,
                          child->m_width,
@@ -161,7 +161,7 @@ static void wxInsertChildInFrame( wxFrame* parent, wxWindow* child )
     {
         // These are inside the client area
         gtk_pizza_put( GTK_PIZZA(parent->m_wxwindow),
-                         GTK_WIDGET(child->m_widget),
+                         child->m_widget,
                          child->m_x,
                          child->m_y,
                          child->m_width,
index 046c601aeb8a811a43ad70aebb1a0af04667e33b..701aeb934da8815e003218ee9267737ab34cb217 100644 (file)
@@ -86,7 +86,7 @@ bool wxHyperlinkCtrl::Create(wxWindow *parent, wxWindowID id,
         }
 
         m_widget = gtk_link_button_new("asdfsaf asdfdsaf asdfdsa");
-        gtk_widget_show( GTK_WIDGET(m_widget) );
+        gtk_widget_show(m_widget);
 
         // alignment
         float x_alignment = 0.5;
index 630bd5d1b3579000cc96f78647c4be263ad248eb..65006103ee5ef64565f7b0a18bc5cf98b4027fe4 100644 (file)
@@ -157,12 +157,12 @@ void wxMenuBar::Init(size_t n, wxMenu *menus[], const wxString titles[], long st
     if (style & wxMB_DOCKABLE)
     {
         m_widget = gtk_handle_box_new();
-        gtk_container_add( GTK_CONTAINER(m_widget), GTK_WIDGET(m_menubar) );
-        gtk_widget_show( GTK_WIDGET(m_menubar) );
+        gtk_container_add(GTK_CONTAINER(m_widget), m_menubar);
+        gtk_widget_show(m_menubar);
     }
     else
     {
-        m_widget = GTK_WIDGET(m_menubar);
+        m_widget = m_menubar;
     }
 
     PostCreation();
@@ -823,7 +823,7 @@ void wxMenuItem::SetText( const wxString& str )
         gtk_accelerator_parse( (const char*) oldbuf, &accel_key, &accel_mods);
         if (accel_key != 0)
         {
-            gtk_widget_remove_accelerator( GTK_WIDGET(m_menuItem),
+            gtk_widget_remove_accelerator(m_menuItem,
                                         m_parentMenu->m_accel,
                                         accel_key,
                                         accel_mods );
@@ -833,7 +833,7 @@ void wxMenuItem::SetText( const wxString& str )
     {
         // if the accelerator was taken from a stock ID, just get it back from GTK+ stock
         if (wxGetStockGtkAccelerator(stockid, &accel_mods, &accel_key))
-            gtk_widget_remove_accelerator( GTK_WIDGET(m_menuItem),
+            gtk_widget_remove_accelerator( m_menuItem,
                                            m_parentMenu->m_accel,
                                            accel_key,
                                            accel_mods );
@@ -846,7 +846,7 @@ void wxMenuItem::SetText( const wxString& str )
         gtk_accelerator_parse( (const char*) buf, &accel_key, &accel_mods);
         if (accel_key != 0)
         {
-            gtk_widget_add_accelerator( GTK_WIDGET(m_menuItem),
+            gtk_widget_add_accelerator( m_menuItem,
                                         "activate",
                                         m_parentMenu->m_accel,
                                         accel_key,
@@ -858,7 +858,7 @@ void wxMenuItem::SetText( const wxString& str )
     {
         // if the accelerator was taken from a stock ID, just get it back from GTK+ stock
         if (wxGetStockGtkAccelerator(stockid, &accel_mods, &accel_key))
-            gtk_widget_remove_accelerator( GTK_WIDGET(m_menuItem),
+            gtk_widget_remove_accelerator( m_menuItem,
                                            m_parentMenu->m_accel,
                                            accel_key,
                                            accel_mods );
@@ -1164,7 +1164,7 @@ bool wxMenu::GtkAppend(wxMenuItem *mitem, int pos)
         gtk_accelerator_parse( (const char*) buf, &accel_key, &accel_mods);
         if (accel_key != 0)
         {
-            gtk_widget_add_accelerator (GTK_WIDGET(menuItem),
+            gtk_widget_add_accelerator (menuItem,
                                         "activate",
                                         m_accel,
                                         accel_key,
@@ -1176,7 +1176,7 @@ bool wxMenu::GtkAppend(wxMenuItem *mitem, int pos)
     {
         // if the accelerator was taken from a stock ID, just get it back from GTK+ stock
         if (wxGetStockGtkAccelerator(stockid, &accel_mods, &accel_key))
-            gtk_widget_add_accelerator( GTK_WIDGET(menuItem),
+            gtk_widget_add_accelerator( menuItem,
                                         "activate",
                                         m_accel,
                                         accel_key,
index 9bd674d57d5018a8e5ae5dbb744f37cf33b30e01..c3a890bd719b32b2febff21427e2dbc133fde6e6 100644 (file)
@@ -113,7 +113,7 @@ gtk_dialog_realized_callback( GtkWidget * WXUNUSED(widget), wxPopupWindow *win )
 static void wxInsertChildInDialog( wxPopupWindow* parent, wxWindow* child )
 {
     gtk_pizza_put( GTK_PIZZA(parent->m_wxwindow),
-                   GTK_WIDGET(child->m_widget),
+                   child->m_widget,
                    child->m_x,
                    child->m_y,
                    child->m_width,
index bad705e02636cd6eee1462b50ce10145a40b18fe..f13b47a7560fc9c1cb456f42f97de4554d0d8ee7 100644 (file)
@@ -244,7 +244,7 @@ void wxScrollBar::SetRange(int range)
 
 GdkWindow *wxScrollBar::GTKGetWindow(wxArrayGdkWindows& WXUNUSED(windows)) const
 {
-    return GTK_WIDGET(GTK_RANGE(m_widget))->window;
+    return m_widget->window;
 }
 
 // static
index d25800f41e9a1c8d8bba0c44c708eb28b5693043..a50d28e0f6902c776dc4bd91ca224ee577230d5f 100644 (file)
@@ -400,7 +400,7 @@ static void wxInsertChildInTopLevelWindow( wxTopLevelWindowGTK* parent, wxWindow
         // these are outside the client area
         wxTopLevelWindowGTK* frame = (wxTopLevelWindowGTK*) parent;
         gtk_pizza_put( GTK_PIZZA(frame->m_mainWidget),
-                         GTK_WIDGET(child->m_widget),
+                         child->m_widget,
                          child->m_x,
                          child->m_y,
                          child->m_width,
@@ -410,7 +410,7 @@ static void wxInsertChildInTopLevelWindow( wxTopLevelWindowGTK* parent, wxWindow
     {
         // these are inside the client area
         gtk_pizza_put( GTK_PIZZA(parent->m_wxwindow),
-                         GTK_WIDGET(child->m_widget),
+                         child->m_widget,
                          child->m_x,
                          child->m_y,
                          child->m_width,
index f7c8878b378ebc275257468aab9f560fab6278f0..5546f6cca756e7826aeb7852a0226d991f006d7c 100644 (file)
@@ -2161,7 +2161,7 @@ static void wxInsertChildInWindow( wxWindowGTK* parent, wxWindowGTK* child )
     child->m_y += gtk_pizza_get_yoffset( pizza );
 
     gtk_pizza_put( GTK_PIZZA(parent->m_wxwindow),
-                     GTK_WIDGET(child->m_widget),
+                     child->m_widget,
                      child->m_x,
                      child->m_y,
                      child->m_width,
@@ -2669,7 +2669,7 @@ void wxWindowGTK::DoSetSize( int x, int y, int width, int height, int sizeFlags
     if (wxDynamicCast(GetParent(), wxToolBar))
     {
        // don't take the x,y values, they're wrong because toolbar sets them
-       GtkWidget  *widget = GTK_WIDGET(m_widget);
+       GtkWidget  *widget = m_widget;
        gtk_widget_set_size_request (widget, m_width, m_height);
     }
     else
@@ -3321,7 +3321,7 @@ void wxWindowGTK::RemoveChild(wxWindowBase *child)
 /* static */
 wxLayoutDirection wxWindowGTK::GTKGetLayout(GtkWidget *widget)
 {
-    return gtk_widget_get_direction(GTK_WIDGET(widget)) == GTK_TEXT_DIR_RTL
+    return gtk_widget_get_direction(widget) == GTK_TEXT_DIR_RTL
                 ? wxLayout_RightToLeft
                 : wxLayout_LeftToRight;
 }
@@ -3331,7 +3331,7 @@ void wxWindowGTK::GTKSetLayout(GtkWidget *widget, wxLayoutDirection dir)
 {
     wxASSERT_MSG( dir != wxLayout_Default, _T("invalid layout direction") );
 
-    gtk_widget_set_direction(GTK_WIDGET(widget),
+    gtk_widget_set_direction(widget,
                              dir == wxLayout_RightToLeft ? GTK_TEXT_DIR_RTL
                                                          : GTK_TEXT_DIR_LTR);
 }