no real changes, just remove unnecessary indentation and scoping after r72001

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72002 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Paul Cornett
2012-07-10 17:17:53 +00:00
parent 4e621d2471
commit c49ba2113c
8 changed files with 291 additions and 331 deletions

View File

@@ -133,7 +133,6 @@ static void wxGtkAboutDialogOnLink(GtkAboutDialog*, const char* link, void*)
#endif
void wxAboutBox(const wxAboutDialogInfo& info, wxWindow* WXUNUSED(parent))
{
{
// don't create another dialog if one is already present
if ( !gs_aboutDialog )
@@ -239,6 +238,5 @@ void wxAboutBox(const wxAboutDialogInfo& info, wxWindow* WXUNUSED(parent))
gtk_window_present(GTK_WINDOW(dlg));
}
}
#endif // wxUSE_ABOUTDLG

View File

@@ -177,11 +177,9 @@ void wxAnyButton::GTKDoShowBitmap(const wxBitmap& bitmap)
image = gtk_bin_get_child(GTK_BIN(m_widget));
}
else // have both label and bitmap
{
{
image = gtk_button_get_image(GTK_BUTTON(m_widget));
}
}
wxCHECK_RET( image && GTK_IS_IMAGE(image), "must have image widget" );

View File

@@ -327,7 +327,6 @@ wxGTK2ArtProvider::CreateIconBundle(const wxArtID& id,
}
// otherwise try icon themes
{
gint *sizes = gtk_icon_theme_get_icon_sizes
(
gtk_icon_theme_get_default(),
@@ -347,7 +346,6 @@ wxGTK2ArtProvider::CreateIconBundle(const wxArtID& id,
&CreateThemeIcon
);
g_free(sizes);
}
return bundle;
}

View File

@@ -2534,8 +2534,6 @@ wxDataViewProgressRenderer::wxDataViewProgressRenderer( const wxString &label,
{
m_label = label;
m_value = 0;
{
m_renderer = (GtkCellRenderer*) gtk_cell_renderer_progress_new();
SetMode(mode);
@@ -2555,7 +2553,6 @@ wxDataViewProgressRenderer::wxDataViewProgressRenderer( const wxString &label,
GTKSetLabel();
}
}
}
wxDataViewProgressRenderer::~wxDataViewProgressRenderer()
{
@@ -2584,7 +2581,6 @@ void wxDataViewProgressRenderer::GTKSetLabel()
}
bool wxDataViewProgressRenderer::SetValue( const wxVariant &value )
{
{
#if !wxUSE_UNICODE
if ( m_needsToSetLabel )
@@ -2597,7 +2593,6 @@ bool wxDataViewProgressRenderer::SetValue( const wxVariant &value )
g_value_set_int( &gvalue, tmp );
g_object_set_property( G_OBJECT(m_renderer), "value", &gvalue );
g_value_unset( &gvalue );
}
return true;
}
@@ -2637,10 +2632,7 @@ wxDataViewChoiceRenderer::wxDataViewChoiceRenderer( const wxArrayString &choices
wxDataViewCustomRenderer( "string", mode, alignment, true )
{
m_choices = choices;
{
m_renderer = (GtkCellRenderer*) gtk_cell_renderer_combo_new();
GtkListStore *store = gtk_list_store_new( 1, G_TYPE_STRING );
for (size_t n = 0; n < m_choices.GetCount(); n++)
{
@@ -2664,7 +2656,6 @@ wxDataViewChoiceRenderer::wxDataViewChoiceRenderer( const wxArrayString &choices
GtkInitHandlers();
}
}
bool wxDataViewChoiceRenderer::Render( wxRect rect, wxDC *dc, int state )
{
@@ -2678,8 +2669,6 @@ wxSize wxDataViewChoiceRenderer::GetSize() const
}
bool wxDataViewChoiceRenderer::SetValue( const wxVariant &value )
{
{
GValue gvalue = { 0, };
g_value_init( &gvalue, G_TYPE_STRING );
@@ -2688,13 +2677,11 @@ bool wxDataViewChoiceRenderer::SetValue( const wxVariant &value )
GetOwner()->GetOwner()->GetFont()));
g_object_set_property( G_OBJECT(m_renderer), "text", &gvalue );
g_value_unset( &gvalue );
}
return true;
}
bool wxDataViewChoiceRenderer::GetValue( wxVariant &value ) const
{
{
GValue gvalue = { 0, };
g_value_init( &gvalue, G_TYPE_STRING );
@@ -2704,10 +2691,6 @@ bool wxDataViewChoiceRenderer::GetValue( wxVariant &value ) const
g_value_unset( &gvalue );
value = temp;
//wxPrintf( "temp %s\n", temp );
// TODO: remove this code
}
return true;
}
@@ -4524,10 +4507,8 @@ bool wxDataViewCtrl::Create(wxWindow *parent,
g_signal_connect (m_treeview, "size_allocate",
G_CALLBACK (gtk_dataviewctrl_size_callback), this);
{
bool fixed = (style & wxDV_VARIABLE_LINE_HEIGHT) == 0;
gtk_tree_view_set_fixed_height_mode( GTK_TREE_VIEW(m_treeview), fixed );
}
if (style & wxDV_MULTIPLE)
{
@@ -4633,10 +4614,8 @@ bool wxDataViewCtrl::AssociateModel( wxDataViewModel *model )
if (!wxDataViewCtrlBase::AssociateModel( model ))
return false;
{
bool fixed = (((GetWindowStyle() & wxDV_VARIABLE_LINE_HEIGHT) == 0) || (model->IsVirtualListModel()));
gtk_tree_view_set_fixed_height_mode( GTK_TREE_VIEW(m_treeview), fixed );
}
m_internal = new wxDataViewCtrlInternal( this, model );
@@ -4660,9 +4639,9 @@ bool wxDataViewCtrl::AppendColumn( wxDataViewColumn *col )
m_cols.Append( col );
{
if (gtk_tree_view_column_get_sizing( GTK_TREE_VIEW_COLUMN(col->GetGtkHandle()) ) !=
GTK_TREE_VIEW_COLUMN_FIXED)
{
gtk_tree_view_set_fixed_height_mode( GTK_TREE_VIEW(m_treeview), FALSE );
}
@@ -4679,9 +4658,9 @@ bool wxDataViewCtrl::PrependColumn( wxDataViewColumn *col )
m_cols.Insert( col );
{
if (gtk_tree_view_column_get_sizing( GTK_TREE_VIEW_COLUMN(col->GetGtkHandle()) ) !=
GTK_TREE_VIEW_COLUMN_FIXED)
{
gtk_tree_view_set_fixed_height_mode( GTK_TREE_VIEW(m_treeview), FALSE );
}
@@ -4698,9 +4677,9 @@ bool wxDataViewCtrl::InsertColumn( unsigned int pos, wxDataViewColumn *col )
m_cols.Insert( pos, col );
{
if (gtk_tree_view_column_get_sizing( GTK_TREE_VIEW_COLUMN(col->GetGtkHandle()) ) !=
GTK_TREE_VIEW_COLUMN_FIXED)
{
gtk_tree_view_set_fixed_height_mode( GTK_TREE_VIEW(m_treeview), FALSE );
}

View File

@@ -1451,7 +1451,6 @@ void wxWindowDCImpl::DoDrawRotatedText( const wxString &text, wxCoord x, wxCoord
wxCHECK_RET( IsOk(), wxT("invalid window dc") );
{
x = XLOG2DEV(x);
y = YLOG2DEV(y);
@@ -1527,7 +1526,6 @@ void wxWindowDCImpl::DoDrawRotatedText( const wxString &text, wxCoord x, wxCoord
CalcBoundingBox(x+minX, y+minY);
CalcBoundingBox(x+maxX, y+maxY);
}
}
void wxWindowDCImpl::DoGetTextExtent(const wxString &string,
wxCoord *width, wxCoord *height,

View File

@@ -72,7 +72,6 @@ bool wxStaticText::Create(wxWindow *parent,
gtk_label_set_justify(GTK_LABEL(m_widget), justify);
{
// set ellipsize mode
PangoEllipsizeMode ellipsizeMode = PANGO_ELLIPSIZE_NONE;
if ( style & wxST_ELLIPSIZE_START )
@@ -83,7 +82,6 @@ bool wxStaticText::Create(wxWindow *parent,
ellipsizeMode = PANGO_ELLIPSIZE_END;
gtk_label_set_ellipsize( GTK_LABEL(m_widget), ellipsizeMode );
}
// GTK_JUSTIFY_LEFT is 0, RIGHT 1 and CENTER 2
static const float labelAlignments[] = { 0.0, 1.0, 0.5 };
@@ -106,9 +104,7 @@ void wxStaticText::GTKDoSetLabel(GTKLabelSetter setter, const wxString& label)
InvalidateBestSize();
{
(this->*setter)(GTK_LABEL(m_widget), label);
}
// adjust the label size to the new label unless disabled
if ( !HasFlag(wxST_NO_AUTORESIZE) &&

View File

@@ -354,10 +354,8 @@ gtk_frame_map_callback( GtkWidget*,
win->GetEventHandler()->ProcessEvent(eventShow);
}
{
// restore focus-on-map setting in case ShowWithoutActivating() was called
gtk_window_set_focus_on_map(GTK_WINDOW(win->m_widget), true);
}
return false;
}
@@ -973,7 +971,6 @@ void wxTopLevelWindowGTK::ShowWithoutActivating()
if (!m_isShown)
{
gtk_window_set_focus_on_map(GTK_WINDOW(m_widget), false);
Show(true);
}
}

View File

@@ -469,9 +469,6 @@ wxGUIAppTraits::GetStandardCmdLineOptions(wxArrayString& names,
{
wxString usage;
{
// since GTK>=2.6, we can use the glib_check_version() symbol...
// check whether GLib version is greater than 2.6 but also lower than 2.33
// because, as we use the undocumented _GOptionGroup struct, we don't want
// to run this code with future versions which might change it (2.32 is the
@@ -502,7 +499,6 @@ wxGUIAppTraits::GetStandardCmdLineOptions(wxArrayString& names,
g_option_group_free (gtkOpts);
}
}
return usage;
}