remove redundant GTK_WIDGET casts
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@45560 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
c079af66c8
commit
10bd1f7d3b
@ -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 );
|
||||
|
||||
|
@ -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
|
||||
|
@ -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",
|
||||
|
@ -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);
|
||||
|
@ -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 );
|
||||
}
|
||||
|
@ -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 ();
|
||||
|
||||
|
@ -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",
|
||||
|
@ -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",
|
||||
|
@ -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,
|
||||
|
@ -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;
|
||||
|
@ -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,
|
||||
|
@ -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,
|
||||
|
@ -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
|
||||
|
@ -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,
|
||||
|
@ -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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user