Mailinglist Archive: yast-commit (396 mails)

< Previous Next >
[yast-commit] r65116 - in /branches/SuSE-Code-11-SP2-Branch/gtk: ./ package/ src/ src/pkg/
Author: rpmcruz
Date: Tue Aug 2 02:51:48 2011
New Revision: 65116

URL: http://svn.opensuse.org/viewcvs/yast?rev=65116&view=rev
Log:
Sync with 11.4 branch.

Modified:
branches/SuSE-Code-11-SP2-Branch/gtk/CMakeLists.txt
branches/SuSE-Code-11-SP2-Branch/gtk/README
branches/SuSE-Code-11-SP2-Branch/gtk/VERSION
branches/SuSE-Code-11-SP2-Branch/gtk/VERSION.cmake
branches/SuSE-Code-11-SP2-Branch/gtk/package/yast2-gtk.changes
branches/SuSE-Code-11-SP2-Branch/gtk/src/YGTreeView.cc
branches/SuSE-Code-11-SP2-Branch/gtk/src/YGUI.h
branches/SuSE-Code-11-SP2-Branch/gtk/src/YGUtils.cc
branches/SuSE-Code-11-SP2-Branch/gtk/src/YGUtils.h
branches/SuSE-Code-11-SP2-Branch/gtk/src/pkg/YGPackageSelector.cc
branches/SuSE-Code-11-SP2-Branch/gtk/src/pkg/pkg-selector-help.cc
branches/SuSE-Code-11-SP2-Branch/gtk/src/pkg/ygtkpkgdetailview.cc
branches/SuSE-Code-11-SP2-Branch/gtk/src/pkg/ygtkpkglistview.cc
branches/SuSE-Code-11-SP2-Branch/gtk/src/pkg/ygtkpkgmenubar.cc
branches/SuSE-Code-11-SP2-Branch/gtk/src/pkg/ygtkpkgpatternview.cc
branches/SuSE-Code-11-SP2-Branch/gtk/src/pkg/ygtkpkgsearchentry.cc
branches/SuSE-Code-11-SP2-Branch/gtk/src/ygtktreeview.c
branches/SuSE-Code-11-SP2-Branch/gtk/src/ygtkwizard.c
branches/SuSE-Code-11-SP2-Branch/gtk/yast2-gtk.spec.in

Modified: branches/SuSE-Code-11-SP2-Branch/gtk/CMakeLists.txt
URL:
http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Code-11-SP2-Branch/gtk/CMakeLists.txt?rev=65116&r1=65115&r2=65116&view=diff
==============================================================================
--- branches/SuSE-Code-11-SP2-Branch/gtk/CMakeLists.txt (original)
+++ branches/SuSE-Code-11-SP2-Branch/gtk/CMakeLists.txt Tue Aug 2 02:51:48 2011
@@ -5,9 +5,6 @@

## configure

-
-set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_CURRENT_BINARY_DIR}/../")
-
find_package (GTK2 REQUIRED gtk)
find_package (Libyui REQUIRED)
find_package (Zypp REQUIRED)

Modified: branches/SuSE-Code-11-SP2-Branch/gtk/README
URL:
http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Code-11-SP2-Branch/gtk/README?rev=65116&r1=65115&r2=65116&view=diff
==============================================================================
--- branches/SuSE-Code-11-SP2-Branch/gtk/README (original)
+++ branches/SuSE-Code-11-SP2-Branch/gtk/README Tue Aug 2 02:51:48 2011
@@ -17,7 +17,8 @@
To make this compile you'll need the following packages installed
(at a minimum):

- gcc-c++ cmake gtk2-devel yast2-devtools yast2-core-devel yast2-libyui-devel
libzypp-devel
+ gcc-c++, cmake, gtk2-devel, yast2-devtools, yast2-core-devel,
+ yast2-libyui-devel, and libzypp-devel

They all are distributed with Suse's CDs.


Modified: branches/SuSE-Code-11-SP2-Branch/gtk/VERSION
URL:
http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Code-11-SP2-Branch/gtk/VERSION?rev=65116&r1=65115&r2=65116&view=diff
==============================================================================
--- branches/SuSE-Code-11-SP2-Branch/gtk/VERSION (original)
+++ branches/SuSE-Code-11-SP2-Branch/gtk/VERSION Tue Aug 2 02:51:48 2011
@@ -1 +1 @@
-2.21.96
+2.21.94

Modified: branches/SuSE-Code-11-SP2-Branch/gtk/VERSION.cmake
URL:
http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Code-11-SP2-Branch/gtk/VERSION.cmake?rev=65116&r1=65115&r2=65116&view=diff
==============================================================================
--- branches/SuSE-Code-11-SP2-Branch/gtk/VERSION.cmake (original)
+++ branches/SuSE-Code-11-SP2-Branch/gtk/VERSION.cmake Tue Aug 2 02:51:48 2011
@@ -1,3 +1,3 @@
SET(VERSION_MAJOR "2")
SET(VERSION_MINOR "21")
-SET(VERSION_PATCH "96")
+SET(VERSION_PATCH "94")

Modified: branches/SuSE-Code-11-SP2-Branch/gtk/package/yast2-gtk.changes
URL:
http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Code-11-SP2-Branch/gtk/package/yast2-gtk.changes?rev=65116&r1=65115&r2=65116&view=diff
==============================================================================
--- branches/SuSE-Code-11-SP2-Branch/gtk/package/yast2-gtk.changes (original)
+++ branches/SuSE-Code-11-SP2-Branch/gtk/package/yast2-gtk.changes Tue Aug 2
02:51:48 2011
@@ -1,4 +1,13 @@
-------------------------------------------------------------------
+Tue Aug 02 01:45:00 WET 2011 - rpmcruz@xxxxxxxxxxxxxxxxxxx
+
+- 2.21.97
+- don't show unsupported packages when the list is empty
+(bnc#704103).
+- showing mnemonics characters (bnc#704102).
+- libzypp bug workaround: don't show changelog dates (bnc#707532).
+
+-------------------------------------------------------------------
Mon Jun 20 10:52:12 CET 2011 - tgoettlicher@xxxxxxx

- fixed build on SLE11SP2 (missing cmake module)

Modified: branches/SuSE-Code-11-SP2-Branch/gtk/src/YGTreeView.cc
URL:
http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Code-11-SP2-Branch/gtk/src/YGTreeView.cc?rev=65116&r1=65115&r2=65116&view=diff
==============================================================================
--- branches/SuSE-Code-11-SP2-Branch/gtk/src/YGTreeView.cc (original)
+++ branches/SuSE-Code-11-SP2-Branch/gtk/src/YGTreeView.cc Tue Aug 2 02:51:48
2011
@@ -202,33 +202,18 @@

virtual bool _immediateMode() { return true; }
virtual bool _shrinkable() { return false; }
- virtual bool _recursiveSelection() { return false; }
-
- void setMark (GtkTreeIter *iter, YItem *yitem, gint column, bool state,
bool recursive)
- {
- setRowMark (iter, column, state);
- yitem->setSelected (state);
-
- if (recursive)
- for (YItemConstIterator it = yitem->childrenBegin();
- it != yitem->childrenEnd(); it++) {
- GtkTreeIter _iter;
- getTreeIter (*it, &_iter);
- setMark (&_iter, *it, column, state, true);
- }
- }

void toggleMark (GtkTreePath *path, gint column)
{
GtkTreeIter iter;
if (!gtk_tree_model_get_iter (getModel(), &iter, path))
return;
+
gboolean state;
gtk_tree_model_get (getModel(), &iter, column, &state, -1);
state = !state;
-
- YItem *yitem = getYItem (&iter);
- setMark (&iter, yitem, column, state, _recursiveSelection());
+ setRowMark (&iter, column, state);
+ getYItem (&iter)->setSelected (state);
syncCount();
emitEvent (YEvent::ValueChanged);
}
@@ -656,10 +641,6 @@
class YGTree : public YTree, public YGTreeView
{
public:
-#if YAST2_VERSION >= 2020003
- YGTree (YWidget *parent, const string &label, bool multiselection, bool
recursiveSelection)
- : YTree (NULL, label, multiselection, recursiveSelection),
-#else
#if YAST2_VERSION >= 2019002
YGTree (YWidget *parent, const string &label, bool multiselection)
: YTree (NULL, label, multiselection),
@@ -667,7 +648,6 @@
YGTree (YWidget *parent, const string &label)
: YTree (NULL, label),
#endif
-#endif
YGTreeView (this, parent, label, true)
{
#if YAST2_VERSION >= 2019002
@@ -691,10 +671,6 @@
g_signal_connect (getWidget(), "row-expanded", G_CALLBACK
(row_expanded_cb), this);
}

-#if YAST2_VERSION >= 2020003
- virtual bool _recursiveSelection() { return recursiveSelection(); }
-#endif
-
void addNode (YItem *item, GtkTreeIter *parent)
{
GtkTreeIter iter;
@@ -774,19 +750,6 @@
virtual YTreeItem *currentItem()
{ return (YTreeItem *) getFocusItem(); }

- void _markItem (YItem *item, bool select, bool recursive) {
- GtkTreeIter iter;
- getTreeIter (item, &iter);
- setRowMark (&iter, 2, select);
-
- if (recursive) {
- YTreeItem *_item = (YTreeItem *) item;
- for (YItemConstIterator it = _item->childrenBegin();
- it != _item->childrenEnd(); it++)
- _markItem (*it, select, true);
- }
- }
-
// YGSelectionStore

void doAddItem (YItem *item) {} // rebuild will be called anyway
@@ -795,11 +758,9 @@
{
#if YAST2_VERSION >= 2019002
if (hasMultiSelection()) {
-#if YAST2_VERSION >= 2020003
- _markItem (item, select, recursiveSelection());
-#else
- _markItem (item, select, false);
-#endif
+ GtkTreeIter iter;
+ getTreeIter (item, &iter);
+ setRowMark (&iter, 2, select);
syncCount();
}
else
@@ -855,10 +816,6 @@
YGSELECTION_WIDGET_IMPL (YTree)
};

-#if YAST2_VERSION >= 2020003
-YTree *YGWidgetFactory::createTree (YWidget *parent, const string &label, bool
multiselection, bool recursiveSelection)
-{ return new YGTree (parent, label, multiselection, recursiveSelection); }
-#else
#if YAST2_VERSION >= 2019002
YTree *YGWidgetFactory::createTree (YWidget *parent, const string &label, bool
multiselection)
{ return new YGTree (parent, label, multiselection); }
@@ -866,5 +823,4 @@
YTree *YGWidgetFactory::createTree (YWidget *parent, const string &label)
{ return new YGTree (parent, label); }
#endif
-#endif


Modified: branches/SuSE-Code-11-SP2-Branch/gtk/src/YGUI.h
URL:
http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Code-11-SP2-Branch/gtk/src/YGUI.h?rev=65116&r1=65115&r2=65116&view=diff
==============================================================================
--- branches/SuSE-Code-11-SP2-Branch/gtk/src/YGUI.h (original)
+++ branches/SuSE-Code-11-SP2-Branch/gtk/src/YGUI.h Tue Aug 2 02:51:48 2011
@@ -89,15 +89,11 @@
virtual YRadioButton *createRadioButton (YWidget *parent, const string
&label, bool isChecked);
virtual YComboBox *createComboBox (YWidget *parent, const string & label,
bool editable);
virtual YSelectionBox *createSelectionBox (YWidget *parent, const
string &label);
-#if YAST2_VERSION >= 2020003
- virtual YTree *createTree (YWidget *parent, const string &label, bool
multiselection, bool recursiveSelection);
-#else
#if YAST2_VERSION >= 2019002
virtual YTree *createTree (YWidget *parent, const string &label, bool
multiselection);
#else
virtual YTree *createTree (YWidget *parent, const string &label);
#endif
-#endif
virtual YTable *createTable (YWidget *parent, YTableHeader *headers,
bool multiSelection);
virtual YProgressBar *createProgressBar (YWidget *parent, const string
&label, int maxValue);
virtual YBusyIndicator *createBusyIndicator (YWidget *parent, const
string &label, int timeout);

Modified: branches/SuSE-Code-11-SP2-Branch/gtk/src/YGUtils.cc
URL:
http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Code-11-SP2-Branch/gtk/src/YGUtils.cc?rev=65116&r1=65115&r2=65116&view=diff
==============================================================================
--- branches/SuSE-Code-11-SP2-Branch/gtk/src/YGUtils.cc (original)
+++ branches/SuSE-Code-11-SP2-Branch/gtk/src/YGUtils.cc Tue Aug 2 02:51:48 2011
@@ -312,12 +312,6 @@
return str;
}

-char *ygutils_mapKBAccel (const char *src)
-{
- std::string ret (YGUtils::mapKBAccel (src));
- return strdup (ret.c_str());
-}
-
void YGUtils::setFilter (GtkEntry *entry, const string &validChars)
{
struct inner {
@@ -638,7 +632,6 @@
{ "Install", _("Install"), GTK_STOCK_APPLY },
{ "OK", _("OK"), GTK_STOCK_OK },
{ "Cancel", _("Cancel"), GTK_STOCK_CANCEL },
- { "Abort", _("Abort"), GTK_STOCK_CANCEL },
{ "Close", _("Close"), GTK_STOCK_CLOSE },
{ "Yes", _("Yes"), GTK_STOCK_YES },
{ "No", _("No"), GTK_STOCK_NO },

Modified: branches/SuSE-Code-11-SP2-Branch/gtk/src/YGUtils.h
URL:
http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Code-11-SP2-Branch/gtk/src/YGUtils.h?rev=65116&r1=65115&r2=65116&view=diff
==============================================================================
--- branches/SuSE-Code-11-SP2-Branch/gtk/src/YGUtils.h (original)
+++ branches/SuSE-Code-11-SP2-Branch/gtk/src/YGUtils.h Tue Aug 2 02:51:48 2011
@@ -71,8 +71,6 @@
};

extern "C" {
- char *ygutils_mapKBAccel (const char *src);
-
void ygutils_setWidgetFont (GtkWidget *widget, PangoStyle style,
PangoWeight weight, double scale);
void ygutils_setPaneRelPosition (GtkWidget *paned, gdouble rel);


Modified: branches/SuSE-Code-11-SP2-Branch/gtk/src/pkg/YGPackageSelector.cc
URL:
http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Code-11-SP2-Branch/gtk/src/pkg/YGPackageSelector.cc?rev=65116&r1=65115&r2=65116&view=diff
==============================================================================
--- branches/SuSE-Code-11-SP2-Branch/gtk/src/pkg/YGPackageSelector.cc (original)
+++ branches/SuSE-Code-11-SP2-Branch/gtk/src/pkg/YGPackageSelector.cc Tue Aug
2 02:51:48 2011
@@ -603,6 +603,13 @@
{ return Ypp::Package (sel).support() <= 1; }
};

+ Ypp::PoolQuery query (Ypp::Selectable::PACKAGE);
+ query.addCriteria (new Ypp::StatusMatch
(Ypp::StatusMatch::TO_MODIFY));
+ query.addCriteria (new UnsupportedMatch());
+ Ypp::List list (query);
+ if(list.size() == 0)
+ return true;
+
GtkWidget *dialog = gtk_message_dialog_new
(YGDialog::currentWindow(),
GtkDialogFlags (0), GTK_MESSAGE_WARNING,
GTK_BUTTONS_NONE,
_("Unsupported packages"));
@@ -615,11 +622,6 @@
gtk_window_set_resizable (GTK_WINDOW (dialog), TRUE);
gtk_window_set_default_size (GTK_WINDOW (dialog), 600, 500);

- Ypp::PoolQuery query (Ypp::Selectable::PACKAGE);
- query.addCriteria (new Ypp::StatusMatch
(Ypp::StatusMatch::TO_MODIFY));
- query.addCriteria (new UnsupportedMatch());
- Ypp::List list (query);
-
YGtkPkgListView view (true, Ypp::List::NAME_SORT, false, true);
view.addCheckColumn (INSTALLED_CHECK_PROP);
view.addTextColumn (_("Name"), NAME_SUMMARY_PROP, true, -1);
@@ -629,7 +631,7 @@
view.setListener (this);
view.setList (list);

- gtk_container_add (GTK_CONTAINER (GTK_DIALOG (dialog)->vbox),
view.getWidget());
+ gtk_container_add (GTK_CONTAINER
(gtk_dialog_get_content_area(GTK_DIALOG (dialog))), view.getWidget());
gtk_widget_show_all (dialog);
int ret = gtk_dialog_run (GTK_DIALOG (dialog));
gtk_widget_destroy (dialog);
@@ -687,12 +689,10 @@
dialog->setIcon (icon);
ygtk_wizard_set_help_text (wizard, _("Please wait..."));

- std::string cancel_str (YGUtils::mapKBAccel ("&Cancel"));
- std::string apply_str (YGUtils::mapKBAccel ("&Apply"));
- ygtk_wizard_set_button_label (wizard, wizard->abort_button,
_(cancel_str.c_str()), GTK_STOCK_CANCEL);
+ ygtk_wizard_set_button_label (wizard, wizard->abort_button,
_("_Cancel"), GTK_STOCK_CANCEL);
ygtk_wizard_set_button_str_id (wizard, wizard->abort_button, "cancel");
ygtk_wizard_set_button_label (wizard, wizard->back_button, NULL, NULL);
- ygtk_wizard_set_button_label (wizard, wizard->next_button,
_(apply_str.c_str()), GTK_STOCK_APPLY);
+ ygtk_wizard_set_button_label (wizard, wizard->next_button,
_("_Apply"), GTK_STOCK_APPLY);
ygtk_wizard_set_button_str_id (wizard, wizard->next_button, "accept");
g_signal_connect (G_OBJECT (wizard), "action-triggered",
G_CALLBACK (wizard_action_cb), this);

Modified: branches/SuSE-Code-11-SP2-Branch/gtk/src/pkg/pkg-selector-help.cc
URL:
http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Code-11-SP2-Branch/gtk/src/pkg/pkg-selector-help.cc?rev=65116&r1=65115&r2=65116&view=diff
==============================================================================
--- branches/SuSE-Code-11-SP2-Branch/gtk/src/pkg/pkg-selector-help.cc (original)
+++ branches/SuSE-Code-11-SP2-Branch/gtk/src/pkg/pkg-selector-help.cc Tue Aug
2 02:51:48 2011
@@ -54,10 +54,10 @@
_("<h2>Filters</h2>"),
_("<h3>Search</h3>"
"<p>Enter free text into the search-field to match their names and
descriptions. "
- "(a search for 'office' will bring up the 'LibreOffice' packages as
well as "
+ "(a search for 'office' will bring up the 'OpenOffice' packages as well
as "
"'AbiWord' which carries the word 'office' in its description). You can
search for "
"multiple keywords by separating the with a white space (e.g. 'spread
sheet' "
- "would return 'libreoffice-calc').You may use the "
+ "would return 'OpenOffice-calc').You may use the "
"search combined with a filter, like searching for a package in a given
repository. "
"Other search attributes are provided, such as to search for a given
file.</p>"),
_("<h3>Groups</h3>"

Modified: branches/SuSE-Code-11-SP2-Branch/gtk/src/pkg/ygtkpkgdetailview.cc
URL:
http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Code-11-SP2-Branch/gtk/src/pkg/ygtkpkgdetailview.cc?rev=65116&r1=65115&r2=65116&view=diff
==============================================================================
--- branches/SuSE-Code-11-SP2-Branch/gtk/src/pkg/ygtkpkgdetailview.cc (original)
+++ branches/SuSE-Code-11-SP2-Branch/gtk/src/pkg/ygtkpkgdetailview.cc Tue Aug
2 02:51:48 2011
@@ -187,7 +187,7 @@

GtkWidget *item;
if (g_file_test (BROWSER_BIN,
G_FILE_TEST_IS_EXECUTABLE)) {
- std::string label (YGUtils::mapKBAccel
("&Open"));
+ std::string label ("_Open");
if (getuid() == 0) {
const char *username = getenv
("USERNAME");
if (!username || !(*username))
@@ -1002,14 +1002,14 @@
const std::list <zypp::ChangelogEntry> &logs =
zpkg->changelog();
for (std::list <zypp::ChangelogEntry>::const_iterator
it = logs.begin();
it != logs.end(); it++) {
- std::string date (it->date().form ("%d %B
%Y")), author (it->author()),
+ std::string author (it->author()),
changes (it->text());
author = YGUtils::escapeMarkup (author);
changes = YGUtils::escapeMarkup (changes);
YGUtils::replace (changes, "\n", 1, "<br>");
if (author.compare (0, 2, "- ", 2) == 0) //
zypp returns a lot of author strings as
author.erase (0, 2);
// "- author". wtf?
- text += "<i>" + date + " (" + author +
"):</i><br><blockquote>" + changes + "</blockquote>";
+ text += "<i>" + author +
":</i><br><blockquote>" + changes + "</blockquote>";
}
}
return text;
@@ -1277,18 +1277,21 @@
gtk_adjustment_set_value (adj, value);
}

- static void fix_keys (GtkWidget *widget, void *_scroll)
+ static void fix_keybindings (GtkWidget *scroll, GtkWidget *widget)
{
- GtkWidget *scroll = (GtkWidget *) _scroll;
if (GTK_IS_TEXT_VIEW (widget))
g_signal_connect (G_OBJECT (widget), "move-cursor",
G_CALLBACK (move_cursor_cb), scroll);
- else if (GTK_IS_CONTAINER (widget))
- gtk_container_foreach (GTK_CONTAINER (widget),
fix_keys, _scroll);
+ else if (GTK_IS_CONTAINER (widget)) {
+ GList *children = gtk_container_get_children
(GTK_CONTAINER (widget));
+ for (GList *i = children; i; i = i->next)
+ fix_keybindings (scroll, (GtkWidget *) i->data);
+ g_list_free (children);
+ }
}

static void scroll_realize_cb (GtkWidget *widget, Impl *pThis)
- { fix_keys (widget, widget); }
+ { fix_keybindings (widget, widget); }
};

YGtkPkgDetailView::YGtkPkgDetailView()

Modified: branches/SuSE-Code-11-SP2-Branch/gtk/src/pkg/ygtkpkglistview.cc
URL:
http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Code-11-SP2-Branch/gtk/src/pkg/ygtkpkglistview.cc?rev=65116&r1=65115&r2=65116&view=diff
==============================================================================
--- branches/SuSE-Code-11-SP2-Branch/gtk/src/pkg/ygtkpkglistview.cc (original)
+++ branches/SuSE-Code-11-SP2-Branch/gtk/src/pkg/ygtkpkglistview.cc Tue Aug 2
02:51:48 2011
@@ -393,17 +393,14 @@
static void right_click_cb (YGtkTreeView *view, gboolean outreach,
YGtkPkgListView *pThis)
{
struct inner {
- static void appendItem (GtkWidget *menu, const char *_label,
+ static void appendItem (GtkWidget *menu, const char *label,
const char *tooltip, const char *stock, bool sensitive,
void (& callback) (GtkMenuItem *item, YGtkPkgListView
*pThis), YGtkPkgListView *pThis)
{
GtkWidget *item;
- std::string label;
- if (_label)
- label = YGUtils::mapKBAccel (_label);
if (stock) {
- if (_label) {
- item =
gtk_image_menu_item_new_with_mnemonic (label.c_str());
+ if (label) {
+ item =
gtk_image_menu_item_new_with_mnemonic (label);
GtkWidget *image =
gtk_image_new_from_stock (stock, GTK_ICON_SIZE_MENU);
gtk_image_menu_item_set_image
(GTK_IMAGE_MENU_ITEM (item), image);
}
@@ -411,7 +408,7 @@
item =
gtk_image_menu_item_new_from_stock (stock, NULL);
}
else
- item = gtk_menu_item_new_with_mnemonic
(label.c_str());
+ item = gtk_menu_item_new_with_mnemonic (label);
if (tooltip)
gtk_widget_set_tooltip_markup (item, tooltip);
gtk_widget_set_sensitive (item, sensitive);
@@ -472,29 +469,29 @@
bool modified = props.toModify();
bool locked = !unlocked && canLock;
if (props.isNotInstalled() && !modified)
- inner::appendItem (menu, _("&Install"), 0,
GTK_STOCK_SAVE,
+ inner::appendItem (menu, _("_Install"), 0,
GTK_STOCK_SAVE,
!locked, inner::install_cb, pThis);
if (props.hasUpgrade() && !modified)
- inner::appendItem (menu, _("&Upgrade"), 0,
GTK_STOCK_GO_UP,
+ inner::appendItem (menu, _("_Upgrade"), 0,
GTK_STOCK_GO_UP,
!locked, inner::install_cb, pThis);
if (type == Ypp::Selectable::PACKAGE && list.size() == 1 &&
inner::hasReinstall (list.get(0)) && !modified)
- inner::appendItem (menu, _("&Re-install"), 0,
GTK_STOCK_REFRESH,
+ inner::appendItem (menu, _("_Re-install"), 0,
GTK_STOCK_REFRESH,
!locked, inner::reinstall_cb, pThis);
if (props.isInstalled() && !modified)
- inner::appendItem (menu, _("&Remove"), 0,
GTK_STOCK_DELETE,
+ inner::appendItem (menu, _("_Remove"), 0,
GTK_STOCK_DELETE,
!locked && props.canRemove(), inner::remove_cb,
pThis);
if (modified)
- inner::appendItem (menu, _("&Undo"), 0, GTK_STOCK_UNDO,
+ inner::appendItem (menu, _("_Undo"), 0, GTK_STOCK_UNDO,
true, inner::undo_cb, pThis);
if (canLock) {
static const char *lock_tooltip =
"<b>Package lock:</b> prevents the package
status from being modified by "
"the dependencies resolver.";
if (props.isLocked())
- inner::appendItem (menu, _("&Unlock"),
_(lock_tooltip),
+ inner::appendItem (menu, _("_Unlock"),
_(lock_tooltip),
GTK_STOCK_DIALOG_AUTHENTICATION, true,
inner::unlock_cb, pThis);
if (unlocked)
- inner::appendItem (menu, _("&Lock"),
_(lock_tooltip),
+ inner::appendItem (menu, _("_Lock"),
_(lock_tooltip),
GTK_STOCK_DIALOG_AUTHENTICATION,
!modified,
inner::lock_cb, pThis);
}

Modified: branches/SuSE-Code-11-SP2-Branch/gtk/src/pkg/ygtkpkgmenubar.cc
URL:
http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Code-11-SP2-Branch/gtk/src/pkg/ygtkpkgmenubar.cc?rev=65116&r1=65115&r2=65116&view=diff
==============================================================================
--- branches/SuSE-Code-11-SP2-Branch/gtk/src/pkg/ygtkpkgmenubar.cc (original)
+++ branches/SuSE-Code-11-SP2-Branch/gtk/src/pkg/ygtkpkgmenubar.cc Tue Aug 2
02:51:48 2011
@@ -68,20 +68,17 @@

// utilities

-static GtkWidget *append_menu_item (GtkWidget *menu, const char *_text,
+static GtkWidget *append_menu_item (GtkWidget *menu, const char *text,
const char *stock, GCallback callback, gpointer callback_data)
{
- std::string text;
- if (_text)
- text = YGUtils::mapKBAccel (_text);
GtkWidget *item;
- if (stock && _text) {
+ if (stock && text) {
GtkWidget *icon = gtk_image_new_from_stock (stock,
GTK_ICON_SIZE_MENU);
- item = gtk_image_menu_item_new_with_mnemonic (text.c_str());
+ item = gtk_image_menu_item_new_with_mnemonic (text);
gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (item),
icon);
}
- else if (_text)
- item = gtk_menu_item_new_with_mnemonic (text.c_str());
+ else if (text)
+ item = gtk_menu_item_new_with_mnemonic (text);
else if (stock)
item = gtk_image_menu_item_new_from_stock (stock, NULL);
else
@@ -690,73 +687,73 @@
Flags flags;

GtkWidget *menu_bar = m_menu, *item, *submenu;
- item = append_menu_item (menu_bar, _("F&ile"), NULL, NULL, NULL);
+ item = append_menu_item (menu_bar, _("F_ile"), NULL, NULL, NULL);
gtk_menu_item_set_submenu (GTK_MENU_ITEM (item), (submenu =
gtk_menu_new()));
- append_menu_item (submenu, _("&Import..."), NULL,
+ append_menu_item (submenu, _("_Import..."), NULL,
G_CALLBACK (import_file_cb), this);
- append_menu_item (submenu, _("&Export..."), NULL,
+ append_menu_item (submenu, _("_Export..."), NULL,
G_CALLBACK (export_file_cb), this);
append_menu_item (submenu, NULL, NULL, NULL, NULL);
append_menu_item (submenu, NULL, GTK_STOCK_APPLY, G_CALLBACK
(accept_item_cb), selector);
append_menu_item (submenu, NULL, GTK_STOCK_QUIT, G_CALLBACK
(reject_item_cb), selector);
if (selector->repoMgrEnabled()) {
- item = append_menu_item (menu_bar, _("&Configuration"), NULL,
NULL, NULL);
+ item = append_menu_item (menu_bar, _("_Configuration"), NULL,
NULL, NULL);
gtk_menu_item_set_submenu (GTK_MENU_ITEM (item), (submenu =
gtk_menu_new()));
- append_menu_item (submenu, _("&Repositories..."), NULL,
+ append_menu_item (submenu, _("_Repositories..."), NULL,
G_CALLBACK (repoManager), this);
if (selector->onlineUpdateMode())
- append_menu_item (submenu, _("&Online
Update..."), NULL,
+ append_menu_item (submenu, _("_Online
Update..."), NULL,
G_CALLBACK (onlineUpdateConfiguration),
this);
else
- append_menu_item (submenu, _("Search Packages
on &Web..."), NULL,
+ append_menu_item (submenu, _("Search Packages
on _Web..."), NULL,
G_CALLBACK (webpinSearch), this);
}
- item = append_menu_item (menu_bar, _("&Dependencies"), NULL, NULL,
NULL);
+ item = append_menu_item (menu_bar, _("_Dependencies"), NULL, NULL,
NULL);
gtk_menu_item_set_submenu (GTK_MENU_ITEM (item), (submenu =
gtk_menu_new()));
- append_menu_item (submenu, _("&Check Now"), NULL,
+ append_menu_item (submenu, _("_Check Now"), NULL,
G_CALLBACK (manualResolvePackageDependencies), this);
- new AutoCheckItem (submenu, _("&Autocheck"), &flags);
+ new AutoCheckItem (submenu, _("_Autocheck"), &flags);

if (!selector->onlineUpdateMode()) {
- item = append_menu_item (menu_bar, _("&Options"), NULL, NULL,
NULL);
+ item = append_menu_item (menu_bar, _("_Options"), NULL, NULL,
NULL);
gtk_menu_item_set_submenu (GTK_MENU_ITEM (item), (submenu =
gtk_menu_new()));
// Translators: don't translate the "-devel"
- new ShowDevelCheckItem (submenu, _("Show -de&vel
Packages"), &flags);
+ new ShowDevelCheckItem (submenu, _("Show -de_vel
Packages"), &flags);
// Translators: don't translate the
"-debuginfo/-debugsource" part
- new ShowDebugCheckItem (submenu, _("Show
-&debuginfo/-debugsource Packages"), &flags);
- new SystemVerificationCheckItem (submenu, _("&System
Verification Mode"), &flags);
- new CleanupDepsCheckItem (submenu, _("&Cleanup when
deleting packages"), &flags);
- new AllowVendorChangeCheckItem (submenu, _("&Allow
vendor change"), &flags);
+ new ShowDebugCheckItem (submenu, _("Show
-_debuginfo/-debugsource Packages"), &flags);
+ new SystemVerificationCheckItem (submenu, _("_System
Verification Mode"), &flags);
+ new CleanupDepsCheckItem (submenu, _("_Cleanup when
deleting packages"), &flags);
+ new AllowVendorChangeCheckItem (submenu, _("_Allow
vendor change"), &flags);
}

- item = append_menu_item (menu_bar, _("E&xtras"), NULL, NULL, NULL);
+ item = append_menu_item (menu_bar, _("E_xtras"), NULL, NULL, NULL);
gtk_menu_item_set_submenu (GTK_MENU_ITEM (item), (submenu =
gtk_menu_new()));
- append_menu_item (submenu, _("Show &Products"), NULL,
+ append_menu_item (submenu, _("Show _Products"), NULL,
G_CALLBACK (show_products_cb), this);
- append_menu_item (submenu, _("Show &Changes"), NULL,
+ append_menu_item (submenu, _("Show _Changes"), NULL,
G_CALLBACK (show_pkg_changes_cb), this);
if (!selector->onlineUpdateMode()) {
- append_menu_item (submenu, _("Show &History"), NULL,
+ append_menu_item (submenu, _("Show _History"), NULL,
G_CALLBACK (show_log_changes_cb), this);
#ifdef HAS_VESTIGIAL_DIALOG
- append_menu_item (submenu, _("Show &Unneeded
Dependencies"), NULL,
+ append_menu_item (submenu, _("Show _Unneeded
Dependencies"), NULL,
G_CALLBACK (show_vestigial_packages_cb), this);
#endif
}
append_menu_item (submenu, NULL, NULL, NULL, NULL);
// Translators: keep "-_devel" untranslated
- append_menu_item (submenu, _("Install All Matching -&devel
Packages"), NULL,
+ append_menu_item (submenu, _("Install All Matching -_devel
Packages"), NULL,
G_CALLBACK (install_all_devel_pkgs_cb), this);
// Translators: keep "-debug-_info" untranslated
- append_menu_item (submenu, _("Install All Matching
-debug-&sinfo Packages"), NULL,
+ append_menu_item (submenu, _("Install All Matching -debug-_info
Packages"), NULL,
G_CALLBACK (install_all_debug_info_pkgs_cb), this);
// Translators: keep "-debug-_source" untranslated
- append_menu_item (submenu, _("Install All Matching
-debug-&source Packages"), NULL,
+ append_menu_item (submenu, _("Install All Matching
-debug-_source Packages"), NULL,
G_CALLBACK (install_all_debug_source_pkgs_cb), this);
append_menu_item (submenu, NULL, NULL, NULL, NULL);
- append_menu_item (submenu, _("Generate Dependencies Resolver
&Testcase"), NULL,
+ append_menu_item (submenu, _("Generate Dependencies Resolver
_Testcase"), NULL,
G_CALLBACK (create_solver_testcase_cb), this);
- append_menu_item (submenu, _("Reset &Ignored Dependencies
Conflicts"), NULL,
+ append_menu_item (submenu, _("Reset _Ignored Dependencies
Conflicts"), NULL,
G_CALLBACK (reset_ignored_dependency_conflicts_cb),
this);

//** TEMP: work-around global-menubar-applet: see bug 595560

Modified: branches/SuSE-Code-11-SP2-Branch/gtk/src/pkg/ygtkpkgpatternview.cc
URL:
http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Code-11-SP2-Branch/gtk/src/pkg/ygtkpkgpatternview.cc?rev=65116&r1=65115&r2=65116&view=diff
==============================================================================
--- branches/SuSE-Code-11-SP2-Branch/gtk/src/pkg/ygtkpkgpatternview.cc
(original)
+++ branches/SuSE-Code-11-SP2-Branch/gtk/src/pkg/ygtkpkgpatternview.cc Tue Aug
2 02:51:48 2011
@@ -247,14 +247,11 @@
static void remove_cb (GtkWidget *widget, ZyppSelectablePtr zsel)
{ Ypp::Selectable (zsel).remove(); }

-static GtkWidget *menu_item_append (GtkWidget *menu, const char *_label, const
char *stock, bool sensitive)
+static GtkWidget *menu_item_append (GtkWidget *menu, const char *label, const
char *stock, bool sensitive)
{
- std::string label;
- if (_label)
- label = YGUtils::mapKBAccel (_label);
GtkWidget *item;
- if (_label) {
- item = gtk_image_menu_item_new_with_mnemonic (label.c_str());
+ if (label) {
+ item = gtk_image_menu_item_new_with_mnemonic (label);
if (stock) {
GtkWidget *icon = gtk_image_new_from_stock (stock,
GTK_ICON_SIZE_MENU);
gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM
(item), icon);
@@ -288,7 +285,7 @@
else {
if (sel.isInstalled()) {
if (sel.canRemove()) {
- item = menu_item_append (menu,
_("&Remove"), GTK_STOCK_REMOVE, true);
+ item = menu_item_append (menu,
_("_Remove"), GTK_STOCK_REMOVE, true);
g_signal_connect (G_OBJECT
(item), "activate",

G_CALLBACK (remove_cb), zsel);
}
@@ -296,7 +293,7 @@
menu_item_append (menu,
_("Remove: cannot remove patterns"), NULL, false);
}
else {
- item = menu_item_append (menu,
_("&Install"), GTK_STOCK_ADD, true);
+ item = menu_item_append (menu,
_("_Install"), GTK_STOCK_ADD, true);
g_signal_connect (G_OBJECT (item),
"activate",

G_CALLBACK (install_cb), zsel);
}

Modified: branches/SuSE-Code-11-SP2-Branch/gtk/src/pkg/ygtkpkgsearchentry.cc
URL:
http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Code-11-SP2-Branch/gtk/src/pkg/ygtkpkgsearchentry.cc?rev=65116&r1=65115&r2=65116&view=diff
==============================================================================
--- branches/SuSE-Code-11-SP2-Branch/gtk/src/pkg/ygtkpkgsearchentry.cc
(original)
+++ branches/SuSE-Code-11-SP2-Branch/gtk/src/pkg/ygtkpkgsearchentry.cc Tue Aug
2 02:51:48 2011
@@ -94,8 +94,7 @@
GTK_ENTRY_ICON_PRIMARY, GTK_STOCK_FIND);
gtk_entry_set_icon_activatable (GTK_ENTRY (impl->entry),
GTK_ENTRY_ICON_PRIMARY, TRUE);

- std::string label_str (YGUtils::mapKBAccel (_("&Find:")));
- GtkWidget *label = gtk_label_new_with_mnemonic (label_str.c_str());
+ GtkWidget *label = gtk_label_new_with_mnemonic (_("_Find:"));
gtk_label_set_mnemonic_widget (GTK_LABEL (label), impl->entry);

impl->combo = gtk_combo_box_new_text();

Modified: branches/SuSE-Code-11-SP2-Branch/gtk/src/ygtktreeview.c
URL:
http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Code-11-SP2-Branch/gtk/src/ygtktreeview.c?rev=65116&r1=65115&r2=65116&view=diff
==============================================================================
--- branches/SuSE-Code-11-SP2-Branch/gtk/src/ygtktreeview.c (original)
+++ branches/SuSE-Code-11-SP2-Branch/gtk/src/ygtktreeview.c Tue Aug 2 02:51:48
2011
@@ -14,8 +14,6 @@
#define YGI18N_C
#include "YGi18n.h"

-extern char *ygutils_mapKBAccel (const char *src);
-
static guint right_click_signal = 0;

G_DEFINE_TYPE (YGtkTreeView, ygtk_tree_view, GTK_TYPE_TREE_VIEW)
@@ -211,9 +209,7 @@
gtk_menu_shell_append (GTK_MENU_SHELL (menu),
gtk_separator_menu_item_new());

GtkWidget *submenu = ygtk_tree_view_create_show_columns_menu (view);
- char *label = ygutils_mapKBAccel (_("&Show column"));
- GtkWidget *item = gtk_menu_item_new_with_mnemonic (label);
- g_free (label);
+ GtkWidget *item = gtk_menu_item_new_with_mnemonic (_("_Show column"));
gtk_menu_shell_append (GTK_MENU_SHELL (menu), item);
gtk_menu_item_set_submenu (GTK_MENU_ITEM (item), submenu);
return menu;

Modified: branches/SuSE-Code-11-SP2-Branch/gtk/src/ygtkwizard.c
URL:
http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Code-11-SP2-Branch/gtk/src/ygtkwizard.c?rev=65116&r1=65115&r2=65116&view=diff
==============================================================================
--- branches/SuSE-Code-11-SP2-Branch/gtk/src/ygtkwizard.c (original)
+++ branches/SuSE-Code-11-SP2-Branch/gtk/src/ygtkwizard.c Tue Aug 2 02:51:48
2011
@@ -24,7 +24,6 @@
#define HELP_IMG_BG "yelp-icon-big"

// YGUtils bridge
-extern char *ygutils_mapKBAccel (const char *src);
extern void ygutils_setWidgetFont (GtkWidget *widget, PangoStyle style,
PangoWeight weight, double scale);
extern void ygutils_setPaneRelPosition (GtkWidget *paned, gdouble rel);
@@ -154,9 +153,7 @@
GtkWidget *close_box = gtk_hbutton_box_new();
gtk_container_add (GTK_CONTAINER (close_box), dialog->close_button);

- char *label_str = ygutils_mapKBAccel (_("&Find:"));
- GtkWidget *bottom_box, *label = gtk_label_new_with_mnemonic (label_str);
- g_free (label_str);
+ GtkWidget *bottom_box, *label = gtk_label_new_with_mnemonic
(_("_Find:"));
gtk_misc_set_alignment (GTK_MISC (label), 0, .5);
gtk_label_set_mnemonic_widget (GTK_LABEL (label), dialog->search_entry);


Modified: branches/SuSE-Code-11-SP2-Branch/gtk/yast2-gtk.spec.in
URL:
http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Code-11-SP2-Branch/gtk/yast2-gtk.spec.in?rev=65116&r1=65115&r2=65116&view=diff
==============================================================================
--- branches/SuSE-Code-11-SP2-Branch/gtk/yast2-gtk.spec.in (original)
+++ branches/SuSE-Code-11-SP2-Branch/gtk/yast2-gtk.spec.in Tue Aug 2 02:51:48
2011
@@ -18,7 +18,6 @@
Requires: gtk2
Requires: yast2-libyui >= 2.18.8
Requires: yast2_theme >= 2.16.1
-Requires: yast2-branding
Requires: libzypp >= 6.3.0
Provides: yast2_ui yast2-ui-gtk
Provides: yast2_ui_pkg

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

< Previous Next >
This Thread
  • No further messages