[yast-commit] r60196 - in /trunk/gtk: ChangeLog src/YGPackageSelectorPluginStub.cc src/pkg/YGPackageSelector.cc
Author: rpmcruz Date: Fri Dec 25 16:37:44 2009 New Revision: 60196 URL: http://svn.opensuse.org/viewcvs/yast?rev=60196&view=rev Log: * src/pkg/YGPackageSelector.cc: fixed crash when search-entry-top=n (which was default). Modified: trunk/gtk/ChangeLog trunk/gtk/src/YGPackageSelectorPluginStub.cc trunk/gtk/src/pkg/YGPackageSelector.cc Modified: trunk/gtk/ChangeLog URL: http://svn.opensuse.org/viewcvs/yast/trunk/gtk/ChangeLog?rev=60196&r1=60195&r2=60196&view=diff ============================================================================== --- trunk/gtk/ChangeLog (original) +++ trunk/gtk/ChangeLog Fri Dec 25 16:37:44 2009 @@ -1,3 +1,8 @@ +2009-12-25 Ricardo Cruz <rpmcruz@alunos.dcc.fc.up.pt> + + * src/pkg/YGPackageSelector.cc: fixed crash when + search-entry-top=n (which was default). + 2009-12-24 Ricardo Cruz <rpmcruz@alunos.dcc.fc.up.pt> * src/pkg/YGPackageSelector.cc: added a bunch of flags Modified: trunk/gtk/src/YGPackageSelectorPluginStub.cc URL: http://svn.opensuse.org/viewcvs/yast/trunk/gtk/src/YGPackageSelectorPluginStub.cc?rev=60196&r1=60195&r2=60196&view=diff ============================================================================== --- trunk/gtk/src/YGPackageSelectorPluginStub.cc (original) +++ trunk/gtk/src/YGPackageSelectorPluginStub.cc Fri Dec 25 16:37:44 2009 @@ -12,11 +12,12 @@ #include <string.h> bool search_entry_side = true, search_entry_top = false, dynamic_sidebar = false, - status_side = false, status_tabs = true, status_tabs_as_actions = false, - undo_side = false, undo_tab = true, undo_old_style = false, status_col = false, - action_col = true, action_col_as_button = true, action_col_as_check = false, - version_col = true, single_line_rows = false, details_start_hide = true, - toolbar_top = false, toolbar_yast = false; + categories_side = true, status_side = false, status_tabs = true, + status_tabs_as_actions = false, undo_side = false, undo_tab = true, + undo_old_style = false, status_col = false, action_col = true, + action_col_as_button = true, action_col_as_check = false, version_col = true, + single_line_rows = false, details_start_hide = true, toolbar_top = false, + toolbar_yast = false, arrange_by = false; struct Arg { const char *arg; @@ -26,6 +27,7 @@ { "search-entry-side", &search_entry_side }, { "search-entry-top", &search_entry_top }, { "dynamic-sidebar", &dynamic_sidebar }, + { "categories-side", &categories_side }, { "status-side", &status_side }, { "status-tabs", &status_tabs }, { "status-tabs-as-actions", &status_tabs_as_actions }, @@ -41,6 +43,7 @@ { "details-start-hide", &details_start_hide }, { "toolbar-top", &toolbar_top }, { "toolbar-yast", &toolbar_yast }, +// { "arrange-by", &arrange_by }, }; static const int arguments_nb = sizeof (arguments) / sizeof (Arg); Modified: trunk/gtk/src/pkg/YGPackageSelector.cc URL: http://svn.opensuse.org/viewcvs/yast/trunk/gtk/src/pkg/YGPackageSelector.cc?rev=60196&r1=60195&r2=60196&view=diff ============================================================================== --- trunk/gtk/src/pkg/YGPackageSelector.cc (original) +++ trunk/gtk/src/pkg/YGPackageSelector.cc Fri Dec 25 16:37:44 2009 @@ -28,10 +28,10 @@ // experiments: extern bool search_entry_side, search_entry_top, dynamic_sidebar, - status_side, status_tabs, status_tabs_as_actions, undo_side, undo_tab, - undo_old_style, status_col, action_col, action_col_as_button, - action_col_as_check, version_col, single_line_rows, details_start_hide, - toolbar_top, toolbar_yast; + categories_side, status_side, status_tabs, status_tabs_as_actions, + undo_side, undo_tab, undo_old_style, status_col, action_col, + action_col_as_button, action_col_as_check, version_col, single_line_rows, + details_start_hide, toolbar_top, toolbar_yast, arrange_by; //** UI components -- split up for re-usability, but mostly for readability @@ -2554,10 +2554,11 @@ m_all_view = m_installed_view = m_available_view = m_upgrades_view = NULL; _QueryWidget *search_entry = 0; - if (search_entry_top) + if (search_entry_top) { search_entry = new SearchEntry (false); - m_query.push_back (search_entry); - gtk_widget_set_size_request (search_entry->getWidget(), 160, -1); + m_query.push_back (search_entry); + gtk_widget_set_size_request (search_entry->getWidget(), 160, -1); + } UndoView *undo_view = 0; if (undo_side || undo_tab) @@ -2597,10 +2598,11 @@ box, gtk_label_new_with_mnemonic (labels[3])); } - if (search_entry) + if (search_entry) { // FIXME: only the entry itself is shown, without the "Find:" label ygtk_notebook_set_corner_widget ( YGTK_NOTEBOOK (packages_box), search_entry->getWidget()); + } } else { m_all_view = ygtk_package_view_new (TRUE); @@ -2679,11 +2681,12 @@ gtk_box_pack_start (GTK_BOX (side_vbox), search_entry->getWidget(), FALSE, TRUE, 0); } - _QueryWidget *categories = new CategoryView(); - m_query.push_back (categories); - GtkWidget *cat_pane = gtk_vpaned_new(); - gtk_paned_pack1 (GTK_PANED (cat_pane), categories->getWidget(), TRUE, FALSE); + if (categories_side) { + _QueryWidget *categories = new CategoryView(); + m_query.push_back (categories); + gtk_paned_pack1 (GTK_PANED (cat_pane), categories->getWidget(), TRUE, FALSE); + } if (status_side) { _QueryWidget *statuses = new StatusView(); m_query.push_back (statuses); @@ -2723,6 +2726,8 @@ } else m_details->setPackage (NULL); + if (!categories_side && !search_entry_side && !status_side) + gtk_widget_hide (side_vbox); } ~UI() -- To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org For additional commands, e-mail: yast-commit+help@opensuse.org
participants (1)
-
rpmcruz@svn.opensuse.org