Mailinglist Archive: yast-commit (2114 mails)

< Previous Next >
[yast-commit] r58717 - in /trunk/gtk: ChangeLog src/YGDumbTab.cc src/YGPackageSelector.cc src/YGTable.cc src/YGUtils.cc src/ygtknotebook.c src/ygtkzyppview.cc src/yzypptags.cc
  • From: rpmcruz@xxxxxxxxxxxxxxxx
  • Date: Wed, 23 Sep 2009 12:23:45 -0000
  • Message-id: <E1MqQss-0007sh-0E@xxxxxxxxxxxxxxxx>
Author: rpmcruz
Date: Wed Sep 23 14:23:45 2009
New Revision: 58717

URL: http://svn.opensuse.org/viewcvs/yast?rev=58717&view=rev
Log:
* src/YGDumbTab.cc: changed calling order of parent
class to reflect yast2-qt (to prevent any bug).

* src/YGTable.cc: bug fix: block GtkTreeSelection events not
only on init, but on only instances when the widget is
mapped. Fixes bootloader tab change misbehavior on 11.2.

* src/YGUtils.cc: bug fix: comply with desktop settings to
not show icons on buttons, as in 11.2.

* src/ygtknotebook.c: bug fix: delete corner child on
destructor. Fixes 11.2 sw_single crash on exit.

* src/yzypptags.cc: speed up sw_single initialization time.

* src/ygtkzyppview.cc: look fix: when icons on buttons are
disabled, show "Undo" as a label instead of as an icon.

* src/YGPackageSelector.cc: bug fix: only set Undo tab
to confirm when the user has not uncoupled it.

* src/YGPackageSelector.cc: give initial focus to search
entry.

Modified:
trunk/gtk/ChangeLog
trunk/gtk/src/YGDumbTab.cc
trunk/gtk/src/YGPackageSelector.cc
trunk/gtk/src/YGTable.cc
trunk/gtk/src/YGUtils.cc
trunk/gtk/src/ygtknotebook.c
trunk/gtk/src/ygtkzyppview.cc
trunk/gtk/src/yzypptags.cc

Modified: trunk/gtk/ChangeLog
URL:
http://svn.opensuse.org/viewcvs/yast/trunk/gtk/ChangeLog?rev=58717&r1=58716&r2=58717&view=diff
==============================================================================
--- trunk/gtk/ChangeLog (original)
+++ trunk/gtk/ChangeLog Wed Sep 23 14:23:45 2009
@@ -1,3 +1,29 @@
+2009-09-23 Ricardo Cruz <rpmcruz@xxxxxxxxxxxxxxxxxxx>
+
+ * src/YGDumbTab.cc: changed calling order of parent
+ class to reflect yast2-qt (to prevent any bug).
+
+ * src/YGTable.cc: bug fix: block GtkTreeSelection events not
+ only on init, but on only instances when the widget is
+ mapped. Fixes bootloader tab change misbehavior on 11.2.
+
+ * src/YGUtils.cc: bug fix: comply with desktop settings to
+ not show icons on buttons, as in 11.2.
+
+ * src/ygtknotebook.c: bug fix: delete corner child on
+ destructor. Fixes 11.2 sw_single crash on exit.
+
+ * src/yzypptags.cc: speed up sw_single initialization time.
+
+ * src/ygtkzyppview.cc: look fix: when icons on buttons are
+ disabled, show "Undo" as a label instead of as an icon.
+
+ * src/YGPackageSelector.cc: bug fix: only set Undo tab
+ to confirm when the user has not uncoupled it.
+
+ * src/YGPackageSelector.cc: give initial focus to search
+ entry.
+
2009-09-22 Ricardo Cruz <rpmcruz@xxxxxxxxxxxxxxxxxxx>

* src/yzypptags.h/cc: -qt PK groups was not caughting

Modified: trunk/gtk/src/YGDumbTab.cc
URL:
http://svn.opensuse.org/viewcvs/yast/trunk/gtk/src/YGDumbTab.cc?rev=58717&r1=58716&r2=58717&view=diff
==============================================================================
--- trunk/gtk/src/YGDumbTab.cc (original)
+++ trunk/gtk/src/YGDumbTab.cc Wed Sep 23 14:23:45 2009
@@ -23,8 +23,8 @@
{
IMPL
m_containee = gtk_event_box_new();
- gtk_widget_show (m_containee);
g_object_ref_sink (G_OBJECT (m_containee));
+ gtk_widget_show (m_containee);

m_last_tab = 0;
// GTK+ keeps the notebook size set to the biggset page. We
can't
@@ -35,7 +35,7 @@
connect (getWidget(), "switch-page", G_CALLBACK
(changed_tab_cb), this);
}

- ~YGDumbTab()
+ virtual ~YGDumbTab()
{
IMPL
gtk_widget_destroy (m_containee);
@@ -85,11 +85,11 @@

virtual void deleteAllItems()
{
- YDumbTab::deleteAllItems();
GList *children = gtk_container_get_children (GTK_CONTAINER
(getWidget()));
for (GList *i = children; i; i = i->next)
gtk_container_remove (GTK_CONTAINER (getWidget()),
(GtkWidget *) i->data);
g_list_free (children);
+ YDumbTab::deleteAllItems();
}

// to re-use the same widget in all tabs (m_fixed), we will remove and
@@ -101,10 +101,8 @@

GtkNotebook *notebook = GTK_NOTEBOOK (getWidget());
int nb = gtk_notebook_get_current_page (notebook);
- GtkWidget *tab = gtk_notebook_get_nth_page (notebook, nb);
-
- gtk_container_add (GTK_CONTAINER (tab), m_containee);
- m_last_tab = tab;
+ m_last_tab = gtk_notebook_get_nth_page (notebook, nb);
+ gtk_container_add (GTK_CONTAINER (m_last_tab), m_containee);
}

virtual YItem *selectedItem()
@@ -127,6 +125,7 @@
gtk_notebook_set_current_page (GTK_NOTEBOOK
(getWidget()), page);
syncTabPage();
}
+ YDumbTab::selectItem (item, selected);
}

virtual void shortcutChanged()
@@ -151,6 +150,7 @@
GtkWidget *child = gtk_notebook_get_nth_page (notebook, tab_nb);
YItem *item = (YItem *) g_object_get_data (G_OBJECT (child),
"yitem");

+ pThis->YDumbTab::selectItem (item);
YGUI::ui()->sendEvent (new YMenuEvent (item));
pThis->syncTabPage();
}

Modified: trunk/gtk/src/YGPackageSelector.cc
URL:
http://svn.opensuse.org/viewcvs/yast/trunk/gtk/src/YGPackageSelector.cc?rev=58717&r1=58716&r2=58717&view=diff
==============================================================================
--- trunk/gtk/src/YGPackageSelector.cc (original)
+++ trunk/gtk/src/YGPackageSelector.cc Wed Sep 23 14:23:45 2009
@@ -747,7 +747,7 @@
m_info_label = gtk_label_new ("");
gtk_label_set_line_wrap (GTK_LABEL (m_info_label), TRUE);
gtk_box_pack_start (GTK_BOX (m_info_box),
- gtk_image_new_from_stock (GTK_STOCK_DIALOG_INFO,
GTK_ICON_SIZE_MENU), FALSE, TRUE, 0);
+ gtk_image_new_from_stock (GTK_STOCK_INFO,
GTK_ICON_SIZE_MENU), FALSE, TRUE, 0);
gtk_box_pack_start (GTK_BOX (m_info_box), m_info_label, TRUE,
TRUE, 0);

GtkWidget *separator1 = gtk_event_box_new();
@@ -902,6 +902,8 @@
G_CALLBACK (name_changed_cb), this);
g_signal_connect (G_OBJECT (m_name), "menu-item-selected",
G_CALLBACK (name_item_changed_cb), this);
+ g_signal_connect (G_OBJECT (m_name), "realize",
+ G_CALLBACK (realize_cb), this);
gtk_widget_show (m_name);
}

@@ -997,6 +999,9 @@
ygtk_find_entry_set_state (entry, TRUE);
pThis->notify();
}
+
+ static void realize_cb (GtkWidget *widget, FindEntry *pThis)
+ { gtk_widget_grab_focus (widget); }
};

class FilterCombo : public QueryWidget
@@ -1186,8 +1191,12 @@
void setUndoPage()
{
if (!m_onlineUpdate) {
- gtk_notebook_set_current_page (GTK_NOTEBOOK
(m_notebook), 3);
- gtk_widget_hide (GTK_WIDGET (m_details));
+ if (GTK_WIDGET_VISIBLE (m_undoView->getWidget())) {
+ if (gtk_notebook_get_current_page (GTK_NOTEBOOK
(m_notebook)) != 3) {
+ gtk_widget_hide (GTK_WIDGET
(m_details));
+ gtk_notebook_set_current_page
(GTK_NOTEBOOK (m_notebook), 3);
+ }
+ }
}
}

@@ -2071,7 +2080,7 @@
pThis->m_notebook->setUndoPage();
YGtkWizard *wizard = YGTK_WIZARD
(pThis->getWidget());
ygtk_wizard_set_button_label (wizard,
wizard->next_button,
-
_("_Sure?"), GTK_STOCK_OK);
+
_("_Sure?"), GTK_STOCK_DIALOG_QUESTION);
pThis->m_button_timeout_id =
g_timeout_add (10*1000,
wizard_confirm_button_cb, pThis);
return;

Modified: trunk/gtk/src/YGTable.cc
URL:
http://svn.opensuse.org/viewcvs/yast/trunk/gtk/src/YGTable.cc?rev=58717&r1=58716&r2=58717&view=diff
==============================================================================
--- trunk/gtk/src/YGTable.cc (original)
+++ trunk/gtk/src/YGTable.cc Wed Sep 23 14:23:45 2009
@@ -11,14 +11,13 @@
#include "YGSelectionModel.h"
#include "ygtkcellrenderertextpixbuf.h"
#include "ygtktreeview.h"
-#include <time.h>

/* A generic widget for table related widgets. */
class YGTableView : public YGScrolledWidget, public YGSelectionModel
{
protected:
int m_colsNb;
- bool m_blockSelected;
+ guint m_blockTimeout;

public:
YGTableView (YWidget *ywidget, YWidget *parent, const string &label,
@@ -28,7 +27,6 @@
, YGSelectionModel ((YSelectionWidget *) ywidget, ordinaryModel, isTree)
{
IMPL
- m_blockSelected = false;
if (ordinaryModel) {
appendIconTextColumn ("", YAlignUnchanged,
YGSelectionModel::ICON_COLUMN,
YGSelectionModel::LABEL_COLUMN);
@@ -42,6 +40,14 @@
gtk_tree_selection_set_mode (getSelection(),
GTK_SELECTION_BROWSE);

// let the derivates do the event hooks. They have subtile
differences.
+
+ m_blockTimeout = 0; // GtkTreeSelection idiotically fires when
showing widget
+ g_signal_connect (getWidget(), "map", G_CALLBACK
(block_init_cb), this);
+ }
+
+ virtual ~YGTableView()
+ {
+ if (m_blockTimeout) g_source_remove (m_blockTimeout);
}

inline GtkTreeView *getView()
@@ -112,14 +118,14 @@
static gboolean block_selected_timeout_cb (gpointer data)
{
YGTableView *pThis = (YGTableView *) data;
- pThis->m_blockSelected = false;
+ pThis->m_blockTimeout = 0;
return FALSE;
}

void blockSelected()
{ // GtkTreeSelection only fires when idle; so set a timeout
- m_blockSelected = true;
- g_timeout_add_full (G_PRIORITY_LOW, 250,
block_selected_timeout_cb, this, NULL);
+ if (m_blockTimeout) g_source_remove (m_blockTimeout);
+ m_blockTimeout = g_timeout_add_full (G_PRIORITY_LOW, 250,
block_selected_timeout_cb, this, NULL);
}

// YGSelectionModel
@@ -169,6 +175,10 @@
return 80;
}

+ // GTK callbacks
+ static void block_init_cb (GtkWidget *widget, YGTableView *pThis)
+ { pThis->blockSelected(); }
+
// toggled by user (through clicking on the renderer or some other
action)
void toggle (GtkTreePath *path, gint column)
{
@@ -187,7 +197,7 @@

static void selection_changed_cb (GtkTreeSelection *selection,
YGTableView *pThis)
{
- if (pThis->m_blockSelected)
+ if (pThis->m_blockTimeout)
return;
if (!pThis->toggleMode()) {
GtkTreeSelection *selection = pThis->getSelection();
@@ -473,6 +483,7 @@
createModel (types);
appendCheckColumn ("", 0);
appendIconTextColumn ("", YAlignUnchanged, 1, 2);
+ gtk_tree_view_set_search_column (getView(), 2);
setModel();

connect (getSelection(), "changed", G_CALLBACK
(selection_changed_cb), (YGTableView *) this);

Modified: trunk/gtk/src/YGUtils.cc
URL:
http://svn.opensuse.org/viewcvs/yast/trunk/gtk/src/YGUtils.cc?rev=58717&r1=58716&r2=58717&view=diff
==============================================================================
--- trunk/gtk/src/YGUtils.cc (original)
+++ trunk/gtk/src/YGUtils.cc Wed Sep 23 14:23:45 2009
@@ -626,8 +626,8 @@
if (gtk_style_lookup_icon_set (button->style, icon)) {
// we want to use GtkImage stock mode so it honors
sensitive
GtkWidget *image = gtk_image_new_from_stock (icon,
GTK_ICON_SIZE_BUTTON);
- gtk_button_set_image (GTK_BUTTON (button), image);
gtk_widget_show (image);
+ gtk_button_set_image (GTK_BUTTON (button), image);
}
}
else {

Modified: trunk/gtk/src/ygtknotebook.c
URL:
http://svn.opensuse.org/viewcvs/yast/trunk/gtk/src/ygtknotebook.c?rev=58717&r1=58716&r2=58717&view=diff
==============================================================================
--- trunk/gtk/src/ygtknotebook.c (original)
+++ trunk/gtk/src/ygtknotebook.c Wed Sep 23 14:23:45 2009
@@ -18,14 +18,21 @@
{
}

+static void ygtk_notebook_destroy (GtkObject *object)
+{
+ YGtkNotebook *notebook = YGTK_NOTEBOOK (object);
+ ygtk_notebook_set_corner_widget (notebook, NULL);
+ GTK_OBJECT_CLASS (ygtk_notebook_parent_class)->destroy (object);
+}
+
static void ygtk_notebook_size_request (GtkWidget *widget, GtkRequisition
*requisition)
{
- GTK_WIDGET_CLASS (ygtk_notebook_parent_class)->size_request (widget,
requisition);
YGtkNotebook *notebook = YGTK_NOTEBOOK (widget);
if (notebook->corner_widget) {
- GtkRequisition child_req; // many widgets like size_request
asked
+ GtkRequisition child_req; // many widgets require size_request
asked
gtk_widget_size_request (notebook->corner_widget, &child_req);
}
+ GTK_WIDGET_CLASS (ygtk_notebook_parent_class)->size_request (widget,
requisition);
}

static void ygtk_notebook_size_allocate (GtkWidget *widget, GtkAllocation
*allocation)
@@ -101,8 +108,11 @@

void ygtk_notebook_set_corner_widget (YGtkNotebook *ynotebook, GtkWidget
*child)
{
+ if (ynotebook->corner_widget)
+ gtk_widget_unparent (ynotebook->corner_widget);
+ if (child)
+ gtk_widget_set_parent (child, GTK_WIDGET (ynotebook));
ynotebook->corner_widget = child;
- gtk_widget_set_parent (child, GTK_WIDGET (ynotebook));
}

GtkWidget *ygtk_notebook_new (void)
@@ -110,6 +120,9 @@

static void ygtk_notebook_class_init (YGtkNotebookClass *klass)
{
+ GtkObjectClass *gtkobject_class = GTK_OBJECT_CLASS (klass);
+ gtkobject_class->destroy = ygtk_notebook_destroy;
+
GtkWidgetClass *gtkwidget_class = GTK_WIDGET_CLASS (klass);
gtkwidget_class->size_request = ygtk_notebook_size_request;
gtkwidget_class->size_allocate = ygtk_notebook_size_allocate;

Modified: trunk/gtk/src/ygtkzyppview.cc
URL:
http://svn.opensuse.org/viewcvs/yast/trunk/gtk/src/ygtkzyppview.cc?rev=58717&r1=58716&r2=58717&view=diff
==============================================================================
--- trunk/gtk/src/ygtkzyppview.cc (original)
+++ trunk/gtk/src/ygtkzyppview.cc Wed Sep 23 14:23:45 2009
@@ -37,7 +37,7 @@
std::string prepend, append;
if (as_user && getuid() == 0) {
char *username = getenv ("USER");
- if (strcmp (username, "root") != 0) {
+ if (username && *username && strcmp (username, "root") != 0) {
prepend.reserve (64);
prepend = "gnomesu -u ";
prepend += username;
@@ -1259,10 +1259,17 @@
m_versions_box = gtk_vbox_new (FALSE, 2);
m_button = gtk_button_new_with_label ("");
g_signal_connect (G_OBJECT (m_button), "clicked",
G_CALLBACK (button_clicked_cb), this);
- m_undo_button = gtk_button_new_with_label ("");
- gtk_button_set_image (GTK_BUTTON (m_undo_button),
- gtk_image_new_from_stock (GTK_STOCK_UNDO,
GTK_ICON_SIZE_BUTTON));
- gtk_widget_set_tooltip_text (m_undo_button, _("Undo"));
+ GtkSettings *settings = gtk_settings_get_default();
+ gboolean show_button_images;
+ g_object_get (settings, "gtk-button-images",
&show_button_images, NULL);
+ if (show_button_images) {
+ m_undo_button = gtk_button_new_with_label ("");
+ gtk_button_set_image (GTK_BUTTON
(m_undo_button),
+ gtk_image_new_from_stock
(GTK_STOCK_UNDO, GTK_ICON_SIZE_BUTTON));
+ gtk_widget_set_tooltip_text (m_undo_button,
_("Undo"));
+ }
+ else
+ m_undo_button = gtk_button_new_with_label
(_("Undo"));
g_signal_connect (G_OBJECT (m_undo_button), "clicked",
G_CALLBACK (undo_clicked_cb), this);
GtkWidget *button_box = gtk_hbox_new (FALSE, 6);
gtk_box_pack_start (GTK_BOX (button_box),
gtk_label_new(""), TRUE, TRUE, 0);

Modified: trunk/gtk/src/yzypptags.cc
URL:
http://svn.opensuse.org/viewcvs/yast/trunk/gtk/src/yzypptags.cc?rev=58717&r1=58716&r2=58717&view=diff
==============================================================================
--- trunk/gtk/src/yzypptags.cc (original)
+++ trunk/gtk/src/yzypptags.cc Wed Sep 23 14:23:45 2009
@@ -105,38 +105,36 @@
if (group[i] >= 'A' && group[i] <= 'Z')
group[i] = group[i] - 'A' + 'a';

- // yast2-qt:
- if ( group.find( "amusements/teaching" ) != string::npos ) return
PK_GROUP_ENUM_EDUCATION;
- if ( group.find( "amusements" ) != string::npos ) return
PK_GROUP_ENUM_GAMES;
- if ( group.find( "development" ) != string::npos ) return
PK_GROUP_ENUM_PROGRAMMING;
- if ( group.find( "hardware" ) != string::npos )
return PK_GROUP_ENUM_SYSTEM;
- if ( group.find( "archiving" ) != string::npos ) return
PK_GROUP_ENUM_ADMIN_TOOLS;
- if ( group.find( "clustering" ) != string::npos ) return
PK_GROUP_ENUM_ADMIN_TOOLS;
- if ( group.find( "system/monitoring" ) != string::npos ) return
PK_GROUP_ENUM_ADMIN_TOOLS;
- if ( group.find( "databases" ) != string::npos ) return
PK_GROUP_ENUM_ADMIN_TOOLS;
- if ( group.find( "system/management" ) != string::npos ) return
PK_GROUP_ENUM_ADMIN_TOOLS;
- if ( group.find( "graphics" ) != string::npos )
return PK_GROUP_ENUM_GRAPHICS;
- if ( group.find( "multimedia" ) != string::npos ) return
PK_GROUP_ENUM_MULTIMEDIA;
- if ( group.find( "network" ) != string::npos ) return
PK_GROUP_ENUM_NETWORK;
- if ( group.find( "office" ) != string::npos ) return
PK_GROUP_ENUM_OFFICE;
- if ( group.find( "text" ) != string::npos ) return
PK_GROUP_ENUM_OFFICE;
- if ( group.find( "editors" ) != string::npos ) return
PK_GROUP_ENUM_OFFICE;
- if ( group.find( "publishing" ) != string::npos ) return
PK_GROUP_ENUM_PUBLISHING;
- if ( group.find( "security" ) != string::npos )
return PK_GROUP_ENUM_SECURITY;
- if ( group.find( "telephony" ) != string::npos ) return
PK_GROUP_ENUM_COMMUNICATION;
- if ( group.find( "gnome" ) != string::npos ) return
PK_GROUP_ENUM_DESKTOP_GNOME;
- if ( group.find( "kde" ) != string::npos ) return
PK_GROUP_ENUM_DESKTOP_KDE;
- if ( group.find( "xfce" ) != string::npos ) return
PK_GROUP_ENUM_DESKTOP_XFCE;
- if ( group.find( "gui/other" ) != string::npos ) return
PK_GROUP_ENUM_DESKTOP_OTHER;
- if ( group.find( "localization" ) != string::npos ) return
PK_GROUP_ENUM_LOCALIZATION;
- if ( group.find( "system" ) != string::npos ) return
PK_GROUP_ENUM_SYSTEM;
- if ( group.find( "scientific" ) != string::npos ) return
PK_GROUP_ENUM_EDUCATION;
+ // yast2-qt: (modified to speed up)
+ if (group.compare (0, 22, "productivity/archiving") == 0) return
PK_GROUP_ENUM_ADMIN_TOOLS;
+ if (group.compare (0, 23, "productivity/clustering") == 0) return
PK_GROUP_ENUM_ADMIN_TOOLS;
+ if (group.compare (0, 22, "productivity/databases") == 0) return
PK_GROUP_ENUM_ADMIN_TOOLS;
+ if (group.compare (0, 17, "system/monitoring") == 0) return
PK_GROUP_ENUM_ADMIN_TOOLS;
+ if (group.compare (0, 17, "system/management") == 0) return
PK_GROUP_ENUM_ADMIN_TOOLS;
+ if (group.compare (0, 23, "productivity/publishing") == 0) return
PK_GROUP_ENUM_PUBLISHING;
+ if (group.compare (0, 22, "productivity/telephony") == 0) return
PK_GROUP_ENUM_COMMUNICATION;
+ if (group.compare (0, 19, "amusements/teaching") == 0) return
PK_GROUP_ENUM_EDUCATION;
+ if (group.compare (0, 17, "publishing/office") == 0) return
PK_GROUP_ENUM_OFFICE;
+ if (group.compare (0, 18, "producitivity/text") == 0) return
PK_GROUP_ENUM_OFFICE;
+ if (group.compare (0, 21, "producitivity/editors") == 0) return
PK_GROUP_ENUM_OFFICE;
+ if (group.compare (0, 20, "producitivity/graphics") == 0) return
PK_GROUP_ENUM_GRAPHICS;
+ if (group.compare (0, 10, "amusements") == 0) return PK_GROUP_ENUM_GAMES;
+ if (group.compare (0, 19, "system/localization") == 0) return
PK_GROUP_ENUM_LOCALIZATION;
+ if (group.compare (0, 11, "development") == 0) return
PK_GROUP_ENUM_PROGRAMMING;
+ if (group.compare (0, 21, "producitivity/network") == 0) return
PK_GROUP_ENUM_NETWORK;
+ if (group.compare (0, 22, "producitivity/security") == 0) return
PK_GROUP_ENUM_SECURITY;
+ if (group.compare (0, 16, "system/gui/gnome") == 0) return
PK_GROUP_ENUM_DESKTOP_GNOME;
+ if (group.compare (0, 14, "system/gui/kde") == 0) return
PK_GROUP_ENUM_DESKTOP_KDE;
+ if (group.compare (0, 15, "system/gui/xfce") == 0) return
PK_GROUP_ENUM_DESKTOP_XFCE;
+ if (group.compare (0, 10, "system/gui") == 0) return
PK_GROUP_ENUM_DESKTOP_OTHER;
+ if (group.compare (0, 8, "hardware") == 0) return PK_GROUP_ENUM_SYSTEM;
+ if (group.compare (0, 6, "system") == 0) return PK_GROUP_ENUM_SYSTEM;
+ if (group.find ("scientific") != string::npos) return
PK_GROUP_ENUM_EDUCATION;
+ if (group.find ("multimedia") != string::npos) return
PK_GROUP_ENUM_MULTIMEDIA;

// our own:
- if ( group.find( "documentation" ) != string::npos ) return
PK_GROUP_ENUM_DOCUMENTATION;
- if ( group.find( "games" ) != string::npos ) return
PK_GROUP_ENUM_GAMES;
- if ( group.find( "productivity" ) != string::npos ) return
PK_GROUP_ENUM_UTILITIES;
-
+ if (group.compare (0, 13, "documentation") == 0) return
PK_GROUP_ENUM_DOCUMENTATION;
+ if (group.compare (0, 12, "productivity") == 0) return
PK_GROUP_ENUM_UTILITIES;
return PK_GROUP_ENUM_UNKNOWN;
}


--
To unsubscribe, e-mail: yast-commit+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: yast-commit+help@xxxxxxxxxxxx

< Previous Next >
This Thread
  • No further messages