[yast-commit] r39838 - in /branches/tmp/mvidner/ui-as-namespace/gtk: ./ mockups/ package/ po/ src/
Author: mvidner Date: Tue Jul 31 14:28:02 2007 New Revision: 39838 URL: http://svn.opensuse.org/viewcvs/yast?rev=39838&view=rev Log: Merged revisions 39047-39835 via svnmerge from http://svn.opensuse.org/svn/yast/trunk/gtk ........ r39098 | rpmcruz | 2007-06-29 18:08:29 +0200 (Pá, 29 čen 2007) | 1 line Check image reference to see if it was well loaded to avoid warnings. ........ r39099 | rpmcruz | 2007-06-29 18:28:59 +0200 (Pá, 29 čen 2007) | 1 line Written MAINTAINER. ........ r39100 | rpmcruz | 2007-06-29 19:45:31 +0200 (Pá, 29 čen 2007) | 3 lines * src/ygtkwizard.c: bug fix: rolled out «let the selection event be fired, when yast programatically selects a tree view item» (was breaking sudo and firewall tools). ........ r39193 | rpmcruz | 2007-07-05 20:11:03 +0200 (Čt, 05 čec 2007) | 1 line Line break confuses auto-stuff. ........ r39427 | rpmcruz | 2007-07-16 13:50:44 +0200 (Po, 16 čec 2007) | 4 lines * src/YGPackageSelector.cc: ported to zypp3 from alpha6: + the SourceManager/Source API has been renamed to RepoManager/Repository /RepoInfo and suffered some changes. + missing include: zypp/Package.h ........ r39437 | rpmcruz | 2007-07-16 16:06:06 +0200 (Po, 16 čec 2007) | 1 line Added a wiki mockup (I am pretty sure from Jakub). ........ r39438 | rpmcruz | 2007-07-16 16:06:58 +0200 (Po, 16 čec 2007) | 1 line Replaced Jakub mockup by a JPEG image (from PNG). ........ r39439 | rpmcruz | 2007-07-16 16:09:06 +0200 (Po, 16 čec 2007) | 1 line Added a couple of TODOs. ........ r39441 | jsrain | 2007-07-16 16:22:02 +0200 (Po, 16 čec 2007) | 3 lines moved changelog to package subdir, added .spec.in and -yast2-gtk-rpmlint files ........ r39442 | jsrain | 2007-07-16 16:26:35 +0200 (Po, 16 čec 2007) | 3 lines Moved the ChangeLog file back, imported package/yast2-gtk.changes from autobuild ........ r39446 | jsrain | 2007-07-16 17:09:46 +0200 (Po, 16 čec 2007) | 2 lines added support for localization ........ r39447 | jsrain | 2007-07-16 17:14:29 +0200 (Po, 16 čec 2007) | 2 lines bump ........ r39517 | rpmcruz | 2007-07-19 06:27:59 +0200 (Čt, 19 čec 2007) | 9 lines * src/YGPackageSelector.cc: Jiri has added gettext support (not sure if it is completed as I don't see the place for PO files and the rules to compile them), so set package selector strings as translatable _( ... ). * po/pt.po: created this translation; dunno how to make the thing being used now... * src/YGPackageSelector.cc: added pre-3 zypp version compatibility; just uncomment #define PRE_ZYPP_3 ........ r39587 | michael_meeks | 2007-07-23 11:56:25 +0200 (Po, 23 čec 2007) | 8 lines 2007-07-23 Michael Meeks <michael.meeks@novell.com> * src/YGPackageSelector.cc: handle 0 size partitions, also don't warn for "out of space" errors on < 1Mb partitions: discarding the annoying warning dialog. (PROGRESS): guard against divide-by-zero too. ........ r39590 | michael_meeks | 2007-07-23 13:43:28 +0200 (Po, 23 čec 2007) | 6 lines 2007-07-23 Michael Meeks <michael.meeks@novell.com> * src/YGPackageSelector.cc (induceObjects): fix tribool related crasher. ........ r39596 | michael_meeks | 2007-07-23 14:35:44 +0200 (Po, 23 čec 2007) | 10 lines 2007-07-23 Michael Meeks <michael.meeks@novell.com> * src/YGPackageSelector.cc * (compat_gtk_tree_model_filter_convert_child_iter_to_iter): back-compat method for older gtk+s (SLED10). * configure.in: autodetect pre ZYPP 3 version, and adapt accordingly. ........ r39605 | michael_meeks | 2007-07-23 16:30:48 +0200 (Po, 23 čec 2007) | 8 lines 2007-07-23 Michael Meeks <michael.meeks@novell.com> * src/YGPackageSelector.cc (sync_tree_views_scroll): this needs re-writing to be more efficient in corner cases: eg. no zypp sources. For now use an iteration timeout of 10 loops before bailing out for a big speed win. ........ r39606 | michael_meeks | 2007-07-23 16:34:09 +0200 (Po, 23 čec 2007) | 5 lines 2007-07-23 Michael Meeks <michael.meeks@novell.com> * Version 2.15.6, Revison 39597 ........ r39607 | michael_meeks | 2007-07-23 16:34:24 +0200 (Po, 23 čec 2007) | 2 lines get rev right. ........ r39689 | jsrain | 2007-07-26 07:46:15 +0200 (Čt, 26 čec 2007) | 3 lines removed yast2-devel from BuildRequires ........ r39697 | jsrain | 2007-07-26 10:58:04 +0200 (Čt, 26 čec 2007) | 2 lines bump ........ Added: branches/tmp/mvidner/ui-as-namespace/gtk/mockups/jakub-installer-mockup.jpg - copied unchanged from r39697, trunk/gtk/mockups/jakub-installer-mockup.jpg branches/tmp/mvidner/ui-as-namespace/gtk/package/ - copied from r39697, trunk/gtk/package/ branches/tmp/mvidner/ui-as-namespace/gtk/package/yast2-gtk-rpmlintrc - copied unchanged from r39697, trunk/gtk/package/yast2-gtk-rpmlintrc branches/tmp/mvidner/ui-as-namespace/gtk/package/yast2-gtk.changes - copied unchanged from r39697, trunk/gtk/package/yast2-gtk.changes branches/tmp/mvidner/ui-as-namespace/gtk/po/ - copied from r39697, trunk/gtk/po/ branches/tmp/mvidner/ui-as-namespace/gtk/po/pt.po - copied unchanged from r39697, trunk/gtk/po/pt.po branches/tmp/mvidner/ui-as-namespace/gtk/src/YGi18n.h - copied unchanged from r39697, trunk/gtk/src/YGi18n.h branches/tmp/mvidner/ui-as-namespace/gtk/yast2-gtk.spec.in - copied unchanged from r39697, trunk/gtk/yast2-gtk.spec.in Modified: branches/tmp/mvidner/ui-as-namespace/gtk/ (props changed) branches/tmp/mvidner/ui-as-namespace/gtk/ChangeLog branches/tmp/mvidner/ui-as-namespace/gtk/MAINTAINER branches/tmp/mvidner/ui-as-namespace/gtk/POTFILES branches/tmp/mvidner/ui-as-namespace/gtk/TODO branches/tmp/mvidner/ui-as-namespace/gtk/VERSION branches/tmp/mvidner/ui-as-namespace/gtk/configure.in.in branches/tmp/mvidner/ui-as-namespace/gtk/src/YGImage.cc branches/tmp/mvidner/ui-as-namespace/gtk/src/YGPackageSelector.cc branches/tmp/mvidner/ui-as-namespace/gtk/src/YGRichText.cc branches/tmp/mvidner/ui-as-namespace/gtk/src/YGUtils.cc branches/tmp/mvidner/ui-as-namespace/gtk/src/ygtkrichtext.c branches/tmp/mvidner/ui-as-namespace/gtk/src/ygtksteps.c branches/tmp/mvidner/ui-as-namespace/gtk/src/ygtkwizard.c Modified: branches/tmp/mvidner/ui-as-namespace/gtk/ChangeLog URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/mvidner/ui-as-namespace/gtk/ChangeLog?rev=39838&r1=39837&r2=39838&view=diff ============================================================================== --- branches/tmp/mvidner/ui-as-namespace/gtk/ChangeLog (original) +++ branches/tmp/mvidner/ui-as-namespace/gtk/ChangeLog Tue Jul 31 14:28:02 2007 @@ -1,3 +1,63 @@ +2007-07-23 Michael Meeks <michael.meeks@novell.com> + + * Version 2.15.6, Revison 39606 + +2007-07-23 Michael Meeks <michael.meeks@novell.com> + + * src/YGPackageSelector.cc (sync_tree_views_scroll): this + needs re-writing to be more efficient in corner cases: eg. + no zypp sources. For now use an iteration timeout of 10 + loops before bailing out for a big speed win. + + * src/YGPackageSelector.cc (compat_gtk_tree_model_filter_convert_child_iter_to_iter): + back-compat method for older gtk+s (SLED10). + + * configure.in: autodetect pre ZYPP 3 version, and adapt + accordingly. + + * src/YGPackageSelector.cc (induceObjects): fix tribool related + crasher n#293065. + (PackageSelector): remove m_searching, in favour of the more robust + !m_search_queries.empty() + + * src/YGImage.cc (YGImage::initOptions): set m_isScaled, m_isTiled + before we use them; kill valgrind uninitialized value error churn. + + * src/YGPackageSelector.cc: handle 0 size partitions, + also don't warn for "out of space" errors on < 1Mb partitions: + discarding the annoying warning dialog. + (PROGRESS): guard against divide-by-zero too. + +2007-07-19 Ricardo Cruz <rpmcruz@alunos.dcc.fc.up.pt> + + * src/YGPackageSelector.cc: Jiri has added gettext support (not sure + if it is completed as I don't see the place for PO files and the rules + to compile them), so set package selector strings as translatable _( ... ). + + * po/pt.po: created this translation; dunno how to make the thing + being used now... + + * src/YGPackageSelector.cc: added pre-3 zypp version compatibility; just + uncomment #define PRE_ZYPP_3 + +2007-71-16 Jiri Srain <jsrain@suse.cz> + + * moved changelog to package subdir, added .spec.in and -yast2-gtk-rpmlint + files + +2007-07-16 Ricardo Cruz <rpmcruz@alunos.dcc.fc.up.pt> + + * src/YGPackageSelector.cc: ported to zypp3 from alpha6: + + the SourceManager/Source API has been renamed to RepoManager/Repository + /RepoInfo and suffered some changes. + + missing include: zypp/Package.h + +2007-06-29 Ricardo Cruz <rpmcruz@alunos.dcc.fc.up.pt> + + * src/ygtkwizard.c: bug fix: rolled out «let the selection event be + fired, when yast programatically selects a tree view item» (was + breaking sudo and firewall tools). + 2007-06-21 Ricardo Cruz <rpmcruz@alunos.dcc.fc.up.pt> * src/YGWidget.h/cc (YGScrolledWidget): Because SelectionBox and others don't Modified: branches/tmp/mvidner/ui-as-namespace/gtk/MAINTAINER URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/mvidner/ui-as-namespace/gtk/MAINTAINER?rev=39838&r1=39837&r2=39838&view=diff ============================================================================== --- branches/tmp/mvidner/ui-as-namespace/gtk/MAINTAINER (original) +++ branches/tmp/mvidner/ui-as-namespace/gtk/MAINTAINER Tue Jul 31 14:28:02 2007 @@ -1 +1,2 @@ -Wild Mongoose <wild.mongoose@mongoose.com> \ No newline at end of file +Ricardo Cruz <rpmcruz@alunos.dcc.fc.up.pt> \ +Michael Meeks <michael.meeks@novell.com> Modified: branches/tmp/mvidner/ui-as-namespace/gtk/POTFILES URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/mvidner/ui-as-namespace/gtk/POTFILES?rev=39838&r1=39837&r2=39838&view=diff ============================================================================== --- branches/tmp/mvidner/ui-as-namespace/gtk/POTFILES (original) +++ branches/tmp/mvidner/ui-as-namespace/gtk/POTFILES Tue Jul 31 14:28:02 2007 @@ -1,25 +0,0 @@ -./src/QY2DiskUsageList.cc -./src/QY2FloppyMountDialog.cc -./src/YQDialog.cc -./src/YQPackageSelector.cc -./src/YQPackageSelectorHelp.cc -./src/YQPkgChangesDialog.cc -./src/YQPkgConflictDialog.cc -./src/YQPkgConflictList.cc -./src/YQPkgDependenciesView.cc -./src/YQPkgDescriptionDialog.cc -./src/YQPkgDiskUsageList.cc -./src/YQPkgDiskUsageWarningDialog.cc -./src/YQPkgLangList.cc -./src/YQPkgList.cc -./src/YQPkgObjList.cc -./src/YQPkgRpmGroupTagsFilterView.cc -./src/YQPkgSearchFilterView.cc -./src/YQPkgSelList.cc -./src/YQPkgStatusFilterView.cc -./src/YQPkgTechnicalDetailsView.cc -./src/YQPkgTextDialog.cc -./src/YQPkgUpdateProblemFilterView.cc -./src/YQPkgVersionsView.cc -./src/YQUI_builtins.cc -./src/YQWizard.cc Modified: branches/tmp/mvidner/ui-as-namespace/gtk/TODO URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/mvidner/ui-as-namespace/gtk/TODO?rev=39838&r1=39837&r2=39838&view=diff ============================================================================== --- branches/tmp/mvidner/ui-as-namespace/gtk/TODO (original) +++ branches/tmp/mvidner/ui-as-namespace/gtk/TODO Tue Jul 31 14:28:02 2007 @@ -7,16 +7,20 @@ = Look and feel = -* (YGBarGraph / RatioBox): let tiny widgets still have some pixels visible +* YGtkWizard: navigation bar (see sysconfig module) should be GtkPaned. + +* YGtkWizard: support for skin -- some mockups under mockups/. + +* YGBarGraph / RatioBox: let tiny widgets still have some pixels visible for popup menu. -* (YGRichText) should use GtkHtml when available, so that we get support for +* YGRichText: should use GtkHtml when available, so that we get support for tables. -* (RatioBox) Our buttons are too big in some dialogs (eg. run disk.ycp as user). +* RatioBox: Our buttons are too big in some dialogs (eg. run disk.ycp as user). Check where our algorithm differs from yast-core's. -* (YGTextEntry / YGMultiLineEdit) Add undo/redo support. The backend code should +* YGTextEntry / YGMultiLineEdit: Add undo/redo support. The backend code should be shared. We probably want to make an interface for it that is then implemented by those two GTK widgets. Work out a patch for GTK+. @@ -28,7 +32,7 @@ (downgrade of version should work for most cases -- check how qt does it). Probably a tab for this? -* Internationalization needs to be supported. +* Translation support (i18n -- pot files -- gettext!). * Search syntax: add proper Google syntax support. Consider also adding regex support when Glib ships with it (add radio boxes to entry's context menu). Modified: branches/tmp/mvidner/ui-as-namespace/gtk/VERSION URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/mvidner/ui-as-namespace/gtk/VERSION?rev=39838&r1=39837&r2=39838&view=diff ============================================================================== --- branches/tmp/mvidner/ui-as-namespace/gtk/VERSION (original) +++ branches/tmp/mvidner/ui-as-namespace/gtk/VERSION Tue Jul 31 14:28:02 2007 @@ -1 +1 @@ -2.15.4 +2.15.7 Modified: branches/tmp/mvidner/ui-as-namespace/gtk/configure.in.in URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/mvidner/ui-as-namespace/gtk/configure.in.in?rev=39838&r1=39837&r2=39838&view=diff ============================================================================== --- branches/tmp/mvidner/ui-as-namespace/gtk/configure.in.in (original) +++ branches/tmp/mvidner/ui-as-namespace/gtk/configure.in.in Tue Jul 31 14:28:02 2007 @@ -32,6 +32,14 @@ AC_HEADER_STDC dnl Try to find the Zypp includes +AC_MSG_CHECKING([for zypp 3]) +if test -f /usr/include/zypp/SourceManager.h; then + AC_DEFINE(PRE_ZYPP_3, 1, [defined if using an older SL10.1 era zypp]) + AC_MSG_RESULT([pre 3]) +else + AC_MSG_RESULT([found]) +fi + PKG_CHECK_MODULES( ZYPP, libzypp ) AC_SUBST(ZYPP_LIBS) Modified: branches/tmp/mvidner/ui-as-namespace/gtk/src/YGImage.cc URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/mvidner/ui-as-namespace/gtk/src/YGImage.cc?rev=39838&r1=39837&r2=39838&view=diff ============================================================================== --- branches/tmp/mvidner/ui-as-namespace/gtk/src/YGImage.cc (original) +++ branches/tmp/mvidner/ui-as-namespace/gtk/src/YGImage.cc Tue Jul 31 14:28:02 2007 @@ -31,15 +31,15 @@ m_imageLoaded = false; m_hasZeroWidth = opt.zeroWidth.value(); m_hasZeroHeight = opt.zeroHeight.value(); + m_isAnimation = opt.animated.value(); + m_isScaled = opt.scaleToFit.value(); + m_isTiled = opt.tiled.value(); if (m_hasZeroWidth || m_isScaled || m_isTiled) setStretchable (YD_HORIZ, true); if (m_hasZeroHeight || m_isScaled || m_isTiled) setStretchable (YD_VERT, true); - m_isAnimation = opt.animated.value(); - m_isScaled = opt.scaleToFit.value(); - m_isTiled = opt.tiled.value(); if (m_isScaled && m_isTiled) { y2warning ("YImage can't be scaled and tiled at the same time"); m_isTiled = false; @@ -255,15 +255,6 @@ } YGWIDGET_IMPL_COMMON -/* - virtual bool stretchable (YUIDimension dim) const - { - IMPL - if (m_isScaled) - return true; - return (dim == YD_HORIZ) ? m_hasZeroWidth : m_hasZeroHeight; - } -*/ }; YWidget * Modified: branches/tmp/mvidner/ui-as-namespace/gtk/src/YGPackageSelector.cc URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/mvidner/ui-as-namespace/gtk/src/YGPackageSelector.cc?rev=39838&r1=39837&r2=39838&view=diff ============================================================================== --- branches/tmp/mvidner/ui-as-namespace/gtk/src/YGPackageSelector.cc (original) +++ branches/tmp/mvidner/ui-as-namespace/gtk/src/YGPackageSelector.cc Tue Jul 31 14:28:02 2007 @@ -2,10 +2,15 @@ * YaST2-GTK - http://en.opensuse.org/YaST2-GTK * ********************************************************************/ +/* + Textdomain "yast2-gtk" +*/ + #include <config.h> #include <ycp/y2log.h> #include <YGUI.h> #include "YGUtils.h" +#include "YGi18n.h" #include "YGWidget.h" #include "YPackageSelector.h" #include "ygtkrichtext.h" @@ -23,11 +28,17 @@ #include <zypp/ui/Selectable.h> #include <zypp/Patch.h> #include <zypp/Selection.h> +#include <zypp/Package.h> #include <zypp/Pattern.h> #include <zypp/Language.h> #include <zypp/Product.h> +#ifdef PRE_ZYPP_3 #include <zypp/Source.h> #include <zypp/SourceManager.h> +#else +#include <zypp/Repository.h> +#include <zypp/RepoManager.h> +#endif /* We should consider linking to libgnome and use gnome_url_show(url) here, or at least do some path finding. */ @@ -75,9 +86,9 @@ return true; } - GtkWidget *dialog = gtk_dialog_new_with_buttons ("License Agreement", + GtkWidget *dialog = gtk_dialog_new_with_buttons (_("License Agreement"), YGUI::ui()->currentWindow(), GTK_DIALOG_MODAL, - "_Reject", GTK_RESPONSE_REJECT, "_Accept", GTK_RESPONSE_ACCEPT, NULL); + _("_Reject"), GTK_RESPONSE_REJECT, _("_Accept"), GTK_RESPONSE_ACCEPT, NULL); GtkWidget *license_view, *license_window; #ifdef PLAIN_TEXT @@ -144,7 +155,7 @@ status = zypp::ui::S_Del; } - // debug +#if 0 // debug const char *name = selectable->name().c_str(); switch (status) { case zypp::ui::S_KeepInstalled: @@ -166,6 +177,7 @@ y2milestone ("error: unknown action: should not happen\n"); break; } +#endif return selectable->set_status (status); } @@ -183,9 +195,9 @@ if (problems.empty()) return true; - GtkWidget *dialog = gtk_dialog_new_with_buttons ("Resolve Problems", + GtkWidget *dialog = gtk_dialog_new_with_buttons (_("Resolve Problems"), YGUI::ui()->currentWindow(), GTK_DIALOG_MODAL, - GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, "C_onfirm", GTK_RESPONSE_ACCEPT, NULL); + GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, _("C_onfirm"), GTK_RESPONSE_ACCEPT, NULL); GtkWidget *problems_view; problems_view = gtk_tree_view_new(); @@ -217,7 +229,7 @@ G_CALLBACK (YGUtils::tree_view_radio_toggle_cb), GTK_TREE_MODEL (problems_store)); - column = gtk_tree_view_column_new_with_attributes ("Problems", + column = gtk_tree_view_column_new_with_attributes (_("Problems"), gtk_cell_renderer_text_new(), "text", 1, NULL); gtk_tree_view_append_column (GTK_TREE_VIEW (problems_view), column); @@ -284,6 +296,7 @@ return false; } +#ifdef PRE_ZYPP_3 static string getSourceName (zypp::Source_Ref source) { // based on yast-qt's singleProduct() if (!source.enabled()) @@ -312,6 +325,7 @@ source.alias().c_str()); return ret; } +#endif #define PACKAGE_INFO_HEIGHT 140 #define ADVANCED_INFO_HEIGHT 80 @@ -345,13 +359,13 @@ gtk_notebook_set_tab_pos (GTK_NOTEBOOK (m_notebook), GTK_POS_BOTTOM); gtk_container_add (GTK_CONTAINER (m_widget), m_notebook); - m_about_text = add_text_tab (m_notebook, "Description"); - m_filelist_text = add_text_tab (m_notebook, "File List"); + m_about_text = add_text_tab (m_notebook, _("Description")); + m_filelist_text = add_text_tab (m_notebook, _("File List")); if ((m_use_filemanager = FILEMANAGER_PRESENT())) g_signal_connect (G_OBJECT (m_filelist_text), "link-pressed", G_CALLBACK (dir_pressed_cb), NULL); - m_history_text = add_text_tab (m_notebook, "History"); - m_authors_text = add_text_tab (m_notebook, "Authors"); + m_history_text = add_text_tab (m_notebook, _("History")); + m_authors_text = add_text_tab (m_notebook, _("Authors")); } gtk_widget_set_size_request (gtk_bin_get_child (GTK_BIN (m_widget)), -1, PACKAGE_INFO_HEIGHT); @@ -398,21 +412,26 @@ description += "<br>"; str = package->url(); if (!str.empty()) - description += "Website: " + str + "<br>"; + description += _("Website: ") + str + "<br>"; str = package->license(); if (!str.empty()) - description += "License: " + str + "<br>"; - description += "Size: " + object->size().asString() + "b<br>"; + description += _("License: ") + str + "<br>"; + description += _("Size: ") + object->size().asString() + "b<br>"; } +#ifdef PRE_ZYPP_3 zypp::Source_Ref source = object->source(); str = getSourceName (source); if (str.empty()) str = source.url().asString(); else str = str + " (" + source.url().asString() + ")"; +#else + zypp::Repository repo = object->repository(); + str = repo.info().name(); +#endif if (!str.empty()) - description += "Source: " + str; + description += _("Repository: ") + str; set_text (m_about_text, description); } @@ -474,11 +493,12 @@ string text; if (!packager.empty()) - text = "Packaged by:<br><blockquote>" + packager + "</blockquote>"; + text = _("Packaged by:") + ("<br><blockquote>" + packager) + + "</blockquote>"; if (!authors.empty()) { if (!packager.empty()) text += "<br><br>"; - text += "Developed by:<br><blockquote>" + authors + + text += _("Developed by:") + ("<br><blockquote>" + authors) + "</blockquote>"; } set_text (m_authors_text, text); @@ -512,7 +532,7 @@ static void set_text (GtkWidget *widget, const string &text) { - const char *str = "<i>(not available)</i>"; + const char *str = _("<i>(not available)</i>"); if (!text.empty()) str = text.c_str(); ygtk_richtext_set_text (YGTK_RICHTEXT (widget), str, TRUE); @@ -553,6 +573,7 @@ G_TYPE_STRING, G_TYPE_STRING); m_model = GTK_TREE_MODEL (store); +#ifdef PRE_ZYPP_3 zypp::SourceManager_Ptr manager = zypp::SourceManager::sourceManager(); for (zypp::SourceManager::Source_const_iterator it = manager->Source_begin(); it != manager->Source_end(); it++) { @@ -565,6 +586,19 @@ 3, src.alias().c_str(), -1); } } +#else + zypp::RepoManager manager; + std::list <zypp::RepoInfo> repos = manager.knownRepositories(); + for (std::list <zypp::RepoInfo>::iterator it = repos.begin(); + it != repos.end(); it++) { + if (it->enabled()) { + GtkTreeIter iter; + gtk_list_store_append (store, &iter); + gtk_list_store_set (store, &iter, 0, bool(it->enabled()), + 1, it->name().c_str(), 2, it->alias().c_str(), -1); + } + } +#endif GtkWidget *view = gtk_tree_view_new_with_model (m_model); gtk_tree_view_set_headers_visible (GTK_TREE_VIEW (view), FALSE); @@ -585,14 +619,16 @@ G_CALLBACK (source_toggled_cb), this); renderer = gtk_cell_renderer_text_new(); - column = gtk_tree_view_column_new_with_attributes ("Name", + column = gtk_tree_view_column_new_with_attributes ("", renderer, "text", 1, NULL); gtk_tree_view_append_column (GTK_TREE_VIEW (view), column); +#ifdef PRE_ZYPP_3 renderer = gtk_cell_renderer_text_new(); - column = gtk_tree_view_column_new_with_attributes ("URL", + column = gtk_tree_view_column_new_with_attributes ("", renderer, "text", 2, NULL); gtk_tree_view_append_column (GTK_TREE_VIEW (view), column); +#endif m_widget = gtk_scrolled_window_new (NULL, NULL); gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (m_widget), @@ -615,6 +651,7 @@ gtk_tree_model_get_iter (model, &iter, path); gtk_tree_path_free (path); +#ifdef PRE_ZYPP_3 gchar *alias; gtk_tree_model_get (model, &iter, 3, &alias, -1); @@ -628,6 +665,20 @@ source.enable(); gtk_list_store_set (GTK_LIST_STORE (model), &iter, 0, source.enabled(), -1); +#else + gchar *alias; + gtk_tree_model_get (model, &iter, 2, &alias, -1); + + zypp::RepoManager manager; + zypp::RepoInfo repo = manager.getRepositoryInfo (alias); + g_free (alias); + + bool enable = !gtk_cell_renderer_toggle_get_active (renderer); + repo.setEnabled (enable); + + gtk_list_store_set (GTK_LIST_STORE (model), &iter, + 0, bool (repo.enabled()), -1); +#endif pThis->m_listener->sources_changed_cb(); } @@ -674,12 +725,12 @@ GtkCellRenderer *renderer; renderer = gtk_cell_renderer_text_new(); - column = gtk_tree_view_column_new_with_attributes ("Mount Point", + column = gtk_tree_view_column_new_with_attributes (_("Mount Point"), renderer, "text", 0, NULL); gtk_tree_view_append_column (GTK_TREE_VIEW (view), column); renderer = gtk_cell_renderer_progress_new(); - column = gtk_tree_view_column_new_with_attributes ("Usage", + column = gtk_tree_view_column_new_with_attributes (_("Usage"), renderer, "value", 1, "text", 2, NULL); gtk_tree_view_append_column (GTK_TREE_VIEW (view), column); @@ -713,14 +764,15 @@ GtkTreeIter iter; gtk_list_store_append (store, &iter); - int usage = (partition.pkg_size * 100) / partition.total_size; + long usage = (partition.pkg_size * 100) / (partition.total_size + 1); string usage_str = sizeToString (partition.pkg_size) + " (of " + sizeToString (partition.total_size) + ")"; gtk_list_store_set (store, &iter, 0, partition.dir.c_str(), 1, usage, 2, usage_str.c_str(), -1); warning = warning || - (partition.total_size - partition.pkg_size < MIN_FREE_MB_WARN); + (partition.total_size > 1024 && + partition.total_size - partition.pkg_size < MIN_FREE_MB_WARN); } } if (warning) @@ -736,9 +788,9 @@ GtkWidget *dialog, *view, *scroll_view; dialog = gtk_message_dialog_new_with_markup (YGUI::ui()->currentWindow(), GTK_DIALOG_DESTROY_WITH_PARENT, GTK_MESSAGE_WARNING, - GTK_BUTTONS_OK, "<b>Disk Almost Full !</b>\n\n" + GTK_BUTTONS_OK, _("<b>Disk Almost Full !</b>\n\n" "One of the partitions is reaching its limit of capacity. You may " - "have to remove packages if you wish to install some."); + "have to remove packages if you wish to install some.")); view = gtk_tree_view_new_with_model (m_model); gtk_tree_view_set_headers_visible (GTK_TREE_VIEW (view), FALSE); @@ -747,10 +799,10 @@ GTK_SELECTION_NONE); GtkTreeViewColumn *column; - column = gtk_tree_view_column_new_with_attributes ("Mount Point", + column = gtk_tree_view_column_new_with_attributes (_("Mount Point"), gtk_cell_renderer_text_new(), "text", 0, NULL); gtk_tree_view_append_column (GTK_TREE_VIEW (view), column); - column = gtk_tree_view_column_new_with_attributes ("Usage", + column = gtk_tree_view_column_new_with_attributes (_("Usage"), gtk_cell_renderer_progress_new(), "value", 1, "text", 2, NULL); gtk_tree_view_append_column (GTK_TREE_VIEW (view), column); @@ -790,18 +842,18 @@ YGtkWizard *wizard = YGTK_WIZARD (getWidget()); ygtk_wizard_set_child (YGTK_WIZARD (getWidget()), main_vbox); GtkWindow *window = YGUI::ui()->currentWindow(); - ygtk_wizard_set_header_text (wizard, window, "Patch Selector"); + ygtk_wizard_set_header_text (wizard, window, _("Patch Selector")); ygtk_wizard_set_header_icon (wizard, window, THEMEDIR "/icons/32x32/apps/yast-software.png"); ygtk_wizard_set_help_text (wizard, - "For information on a given patch, just press it and as well as the " + _("For information on a given patch, just press it and as well as the " "Package Information expander to make those informations visible.<br>" "To install a patch you just need to press the check button next to it " - "and then the button Install when you are done." + "and then the button Install when you are done.") ); - ygtk_wizard_set_next_button_label (wizard, "_Install"); + ygtk_wizard_set_next_button_label (wizard, _("_Install")); ygtk_wizard_set_next_button_id (wizard, g_strdup ("install"), g_free); - ygtk_wizard_set_abort_button_label (wizard, "_Cancel"); + ygtk_wizard_set_abort_button_label (wizard, _("_Cancel")); ygtk_wizard_set_abort_button_id (wizard, g_strdup ("cancel"), g_free); g_signal_connect (G_OBJECT (getWidget()), "action-triggered", G_CALLBACK (wizard_action_cb), this); @@ -814,7 +866,7 @@ GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC); gtk_container_add (GTK_CONTAINER (patches_window), m_patches_view); - m_information_widget = new PackageInformation ("Patch Information", true); + m_information_widget = new PackageInformation (_("Patch Information"), true); GtkWidget *pkg_info_widget = m_information_widget->getWidget(); gtk_box_pack_start (GTK_BOX (main_vbox), patches_window, TRUE, TRUE, 6); @@ -835,11 +887,11 @@ g_signal_connect (G_OBJECT (renderer), "toggled", G_CALLBACK (patch_toggled_cb), this); - column = gtk_tree_view_column_new_with_attributes ("Priority", + column = gtk_tree_view_column_new_with_attributes (_("Priority"), gtk_cell_renderer_text_new(), "text", 1, NULL); gtk_tree_view_append_column (GTK_TREE_VIEW (m_patches_view), column); - column = gtk_tree_view_column_new_with_attributes ("Name", + column = gtk_tree_view_column_new_with_attributes (_("Name"), gtk_cell_renderer_text_new(), "text", 2, NULL); gtk_tree_view_append_column (GTK_TREE_VIEW (m_patches_view), column); @@ -969,7 +1021,6 @@ GtkWidget *m_search_entry, *m_plain_view; guint search_timeout_id; bool name_opt, summary_opt, descr_opt, provides_opt, requires_opt; - bool m_searching; list <string> m_search_queries; // Interface tweak @@ -997,10 +1048,10 @@ allows for more than one model type be used and is also better for speed, since the filter and tree view then installed upon don't have to keep syncing at every item change. */ - installed_box = createListWidget ("<b>Installed Software:</b>", + installed_box = createListWidget (_("<b>Installed Software:</b>"), "computer", computer_xpm, m_installed_view, 1, false); - available_box = createListWidget ("<b>Available Software:</b>", + available_box = createListWidget (_("<b>Available Software:</b>"), "gtk-cdrom", NULL, m_available_view, 2, true); @@ -1024,8 +1075,8 @@ gtk_container_add (GTK_CONTAINER (buttons_minsize), selection_buttons_vbox); ygtk_min_size_set_only_expand (YGTK_MIN_SIZE (buttons_minsize), TRUE); - install_button = createArrowButton ("_install", GTK_ARROW_RIGHT, &m_install_label); - remove_button = createArrowButton ("_remove", GTK_ARROW_LEFT, &m_remove_label); + install_button = createArrowButton (_("_install"), GTK_ARROW_RIGHT, &m_install_label); + remove_button = createArrowButton (_("_remove"), GTK_ARROW_LEFT, &m_remove_label); GtkWidget *install_align = gtk_alignment_new (0, 1, 1, 0); gtk_container_add (GTK_CONTAINER (install_align), install_button); @@ -1045,16 +1096,16 @@ GtkWidget *view_box, *view_label, *view_categories, *view_patterns, *view_languages; - view_label = gtk_label_new ("View Packages:"); + view_label = gtk_label_new (_("View Packages:")); gtk_label_set_use_markup (GTK_LABEL (view_label), TRUE); gtk_misc_set_alignment (GTK_MISC (view_label), 0, 0.5); - m_plain_view = gtk_radio_button_new_with_mnemonic (NULL, "as _plain list"); + m_plain_view = gtk_radio_button_new_with_mnemonic (NULL, _("as _plain list")); view_categories = gtk_radio_button_new_with_mnemonic_from_widget - (GTK_RADIO_BUTTON (m_plain_view), "in _categories"); + (GTK_RADIO_BUTTON (m_plain_view), _("in _categories")); view_patterns = gtk_radio_button_new_with_mnemonic_from_widget - (GTK_RADIO_BUTTON (m_plain_view), "in _patterns"); + (GTK_RADIO_BUTTON (m_plain_view), _("in _patterns")); view_languages = gtk_radio_button_new_with_mnemonic_from_widget - (GTK_RADIO_BUTTON (m_plain_view), "in _languages"); + (GTK_RADIO_BUTTON (m_plain_view), _("in _languages")); view_box = gtk_hbox_new (FALSE, 0); gtk_box_pack_start (GTK_BOX (view_box), view_label, FALSE, TRUE, 0); gtk_box_pack_start (GTK_BOX (view_box), m_plain_view, FALSE, TRUE, 4); @@ -1076,7 +1127,7 @@ GtkWidget *search_hbox, *search_label; search_hbox = gtk_hbox_new (FALSE, 0); - search_label = gtk_label_new_with_mnemonic ("_Search:"); + search_label = gtk_label_new_with_mnemonic (_("_Search:")); gtk_label_set_use_markup (GTK_LABEL (search_label), TRUE); gtk_misc_set_alignment (GTK_MISC (search_label), 0, 0.5); m_search_entry = ygtk_find_entry_new(); @@ -1098,17 +1149,17 @@ gtk_size_group_add_widget (align_labels, search_label); g_object_unref (G_OBJECT (align_labels)); - m_information_widget = new PackageInformation ("Package Information", false); + m_information_widget = new PackageInformation (_("Package Information"), false); GtkWidget *pkg_info_widget = m_information_widget->getWidget(); m_sources_table = new SourcesTable (this); m_disk_table = new DiskTable(); - GtkWidget *advanced_expander = gtk_expander_new ("Advanced"); + GtkWidget *advanced_expander = gtk_expander_new (_("Advanced")); GtkWidget *advanced_notebook = gtk_notebook_new(); GtkWidget *sources_vbox = gtk_vbox_new (FALSE, 4); GtkWidget *sources_label = gtk_label_new ( - "<i>Use the Installation Source tool to manage the sources.</i>"); + _("<i>Use the Installation Source tool to manage the sources.</i>")); gtk_misc_set_alignment (GTK_MISC (sources_label), 1, 0); gtk_label_set_use_markup (GTK_LABEL (sources_label), TRUE); gtk_box_pack_start (GTK_BOX (sources_vbox), m_sources_table->getWidget(), @@ -1116,9 +1167,9 @@ gtk_box_pack_start (GTK_BOX (sources_vbox), sources_label, TRUE, TRUE, 0); gtk_notebook_set_tab_pos (GTK_NOTEBOOK (advanced_notebook), GTK_POS_BOTTOM); gtk_notebook_append_page (GTK_NOTEBOOK (advanced_notebook), - sources_vbox, gtk_label_new ("Packages Sources")); + sources_vbox, gtk_label_new (_("Repositories"))); gtk_notebook_append_page (GTK_NOTEBOOK (advanced_notebook), - m_disk_table->getWidget(), gtk_label_new ("Disk Usage")); + m_disk_table->getWidget(), gtk_label_new (_("Disk Usage"))); gtk_container_add (GTK_CONTAINER (advanced_expander), advanced_notebook); gtk_box_pack_start (GTK_BOX (m_widget), packages_hbox, TRUE, TRUE, 0); @@ -1197,7 +1248,7 @@ g_object_set (G_OBJECT (text_renderer), "ellipsize", PANGO_ELLIPSIZE_END, NULL); GtkTreeViewColumn *column; - column = gtk_tree_view_column_new_with_attributes ("Packages", + column = gtk_tree_view_column_new_with_attributes (_("Packages"), text_renderer, "markup", package_name_col, "style", 9, NULL); gtk_tree_view_column_set_expand (column, TRUE); gtk_tree_view_append_column (GTK_TREE_VIEW (list), column); @@ -1244,7 +1295,7 @@ gtk_dialog_set_has_separator (GTK_DIALOG (dialog), FALSE); vbox = GTK_DIALOG (dialog)->vbox; // gtk_container_set_border_width (GTK_CONTAINER (vbox), 8); - label = gtk_label_new ("Loading packages list..."); + label = gtk_label_new (_("Loading packages list...")); gtk_misc_set_alignment (GTK_MISC (label), 0, 0); gtk_box_pack_start (GTK_BOX (vbox), label, TRUE, TRUE, 4); progress = gtk_progress_bar_new(); @@ -1286,7 +1337,7 @@ #define SET_PROGRESS(_steps, _jump) int steps = _steps, step = 0, jump = _jump; #define PROGRESS() \ if (progress && ((step++) % jump == 0)) { \ - gdouble fraction = ((gdouble) step) / steps; \ + gdouble fraction = steps > 0 ? ((gdouble) step) / steps : 0; \ gtk_progress_bar_set_fraction (progress, fraction); \ while (gtk_events_pending()) gtk_main_iteration(); } @@ -1520,11 +1571,20 @@ // zypp keeps on the pool objects whose sources we disabled, so we may // need to calculate the candidate object here. +#ifdef PRE_ZYPP_3 if (available_obj != NULL && !available_obj->source().enabled()) { +#else + // beware lurking tribool requires bool cast here. + if (available_obj != NULL && !(bool)(available_obj->repository().info().enabled())) { +#endif available_obj = NULL; for (zypp::ui::Selectable::available_iterator it = selectable->availableBegin(); it != selectable->availableEnd(); it++) { +#ifdef PRE_ZYPP_3 if (!(*it)->source().enabled()) +#else + if (!(*it)->repository().info().enabled()) +#endif ; else if (!available_obj) available_obj = *it; @@ -1538,7 +1598,11 @@ if (available_obj != NULL) { for (zypp::ui::Selectable::available_iterator it = selectable->availableBegin(); it != selectable->availableEnd(); it++) { +#ifdef PRE_ZYPP_3 if (!(*it)->source().enabled()) +#else + if (!(*it)->repository().info().enabled()) +#endif continue; int res = zypp::Edition::compare ((*it)->edition(), available_obj->edition()); @@ -1716,7 +1780,6 @@ GTK_TOGGLE_BUTTON (pThis->m_plain_view)); if (!plain_view) gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (pThis->m_plain_view), TRUE); - pThis->m_searching = strlen (query) > 0; pThis->m_search_queries = YGUtils::splitString (query, ' '); // just re-filter @@ -1732,11 +1795,11 @@ GtkMenu *create_search_menu() { GtkWidget *menu = gtk_menu_new(); - append_option_item (menu, "Name", &name_opt); - append_option_item (menu, "Summary", &summary_opt); - append_option_item (menu, "Description", &descr_opt); - append_option_item (menu, "RPM Provides", &provides_opt); - append_option_item (menu, "RPM Requires", &requires_opt); + append_option_item (menu, _("Name"), &name_opt); + append_option_item (menu, _("Summary"), &summary_opt); + append_option_item (menu, _("Description"), &descr_opt); + append_option_item (menu, _("RPM Provides"), &provides_opt); + append_option_item (menu, _("RPM Requires"), &requires_opt); gtk_widget_show_all (menu); return GTK_MENU (menu); } @@ -1760,7 +1823,7 @@ gtk_tree_model_get (model, iter, visible_col, &visible, 8, &has_children, -1); if (has_children) visible = TRUE; - else if (visible && pThis->m_searching) { + else if (visible && !pThis->m_search_queries.empty()) { ZyppSelectablePtr selectable; gtk_tree_model_get (model, iter, 0, &selectable, -1); visible = pThis->does_package_match (selectable); @@ -1850,6 +1913,38 @@ return false; } + // For SLED10 / older gtk+'s ... + static bool compat_gtk_tree_model_filter_convert_child_iter_to_iter (GtkTreeModelFilter *filter, + GtkTreeIter *filter_iter, + GtkTreeIter *child_iter) + { +#if GTK_CHECK_VERSION(2,10,0) + return gtk_tree_model_filter_convert_child_iter_to_iter (filter, filter_iter, child_iter); +#else // cut/paste from gtk+ HEAD... + gboolean ret; + GtkTreePath *child_path, *path; + + memset (filter_iter, 0, sizeof (GtkTreeIter)); + + GtkTreeModel *child_model; + g_object_get (G_OBJECT (filter), "child-model", &child_model, NULL); + child_path = gtk_tree_model_get_path (child_model, child_iter); + g_return_val_if_fail (child_path != NULL, FALSE); + + path = gtk_tree_model_filter_convert_child_path_to_path (filter, + child_path); + gtk_tree_path_free (child_path); + + if (!path) + return FALSE; + + ret = gtk_tree_model_get_iter (GTK_TREE_MODEL (filter), filter_iter, path); + gtk_tree_path_free (path); + + return ret; +#endif + } + static bool sync_tree_views_scroll (GtkTreeView *current_view, GtkTreeView *other_view, GtkTreePath *current_path, bool select_it) { @@ -1873,12 +1968,17 @@ gtk_tree_model_get_iter (base_model, &iter, _path); gtk_tree_path_free (_path); - while (!gtk_tree_model_filter_convert_child_iter_to_iter ( + int timeout = 0; + // Try to find a a similar item in the other view to synchronise with + while (!compat_gtk_tree_model_filter_convert_child_iter_to_iter ( GTK_TREE_MODEL_FILTER (gtk_tree_view_get_model (other_view)), &other_iter, &iter)) { if (!gtk_tree_model_iter_next (base_model, &iter)) return false; + // This turns into N^3 very quickly if we search too hard + if (timeout++ > 10) + return false; select_it = false; // not the same package -- dont select it then } @@ -1947,33 +2047,34 @@ GtkLabel *install_label = GTK_LABEL (pThis->m_install_label), *remove_label = GTK_LABEL (pThis->m_remove_label); if (selected_rows > 1) { - gtk_label_set_text (install_label, "_install"); - gtk_label_set_text (remove_label, "_remove"); + gtk_label_set_text (install_label, _("_install")); + gtk_label_set_text (remove_label, _("_remove")); } else { // personalize // remove label if (sel && sel->toInstall()) - gtk_label_set_text (remove_label, "_undo"); + gtk_label_set_text (remove_label, _("_undo")); else - gtk_label_set_text (remove_label, "_remove"); + gtk_label_set_text (remove_label, _("_remove")); // install label if (sel && sel->toDelete()) - gtk_label_set_text (install_label, "_undo"); + gtk_label_set_text (install_label, _("_undo")); else if (!install_obj) - gtk_label_set_text (install_label, "_install"); + gtk_label_set_text (install_label, _("_install")); else if (available_obj) { int res = zypp::Edition::compare (install_obj->edition(), available_obj->edition()); if (res < 0) - gtk_label_set_text (install_label, "_upgrade"); + gtk_label_set_text (install_label, _("_upgrade")); else if (res > 0) - gtk_label_set_text (install_label, "_downgrade"); + gtk_label_set_text (install_label, _("_downgrade")); else - gtk_label_set_text (install_label, "re-_install"); + gtk_label_set_text (install_label, _("re-_install")); } } gtk_label_set_use_underline (install_label, TRUE); gtk_label_set_use_underline (remove_label, TRUE); + safeguard = false; } @@ -2005,7 +2106,6 @@ iters[i] = iter; } g_list_free (selected); - for (i = 0; i < selected_len; i++) { GtkTreeIter *iter = &iters[i]; ZyppSelectablePtr sel = 0; @@ -2119,20 +2219,20 @@ ygtk_wizard_set_header_text (wizard, YGUI::ui()->currentWindow(), "Package Selector"); ygtk_wizard_set_help_text (wizard, - "Two pools are presented; one with the available software, the other " + _("Two pools are presented; one with the available software, the other " "with the installed one. To install software you choose a package " "from the install pool and press Install. Similar method for removal " "of software. When you are done press the Accept button.<br>" "Information on a given package is displayed on the Package Information " "expander at the bottom which may be enlarged.<br>" "A categories view of the software is possible, as well as searching " - "for a given package." + "for a given package.") ); - ygtk_wizard_set_abort_button_label (wizard, "_Cancel"); + ygtk_wizard_set_abort_button_label (wizard, _("_Cancel")); ygtk_wizard_set_abort_button_id (wizard, g_strdup ("cancel"), g_free); ygtk_wizard_set_back_button_label (wizard, ""); - ygtk_wizard_set_next_button_label (wizard, "_Accept"); + ygtk_wizard_set_next_button_label (wizard, _("_Accept")); ygtk_wizard_set_next_button_id (wizard, g_strdup ("accept"), g_free); g_signal_connect (G_OBJECT (getWidget()), "action-triggered", G_CALLBACK (wizard_action_cb), this); @@ -2195,14 +2295,14 @@ if (zyppPool().empty <zypp::Package> ()) return false; - GtkWidget *dialog = gtk_dialog_new_with_buttons ("Changes Summary", + GtkWidget *dialog = gtk_dialog_new_with_buttons (_("Changes Summary"), YGUI::ui()->currentWindow(), GtkDialogFlags (GTK_DIALOG_MODAL | GTK_DIALOG_NO_SEPARATOR), - GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, "C_onfirm", GTK_RESPONSE_ACCEPT, NULL); + GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, _("C_onfirm"), GTK_RESPONSE_ACCEPT, NULL); GtkWidget *install_label, *remove_label, *install_view, *remove_view; - install_label = gtk_label_new ("To install:"); - remove_label = gtk_label_new ("To remove:"); + install_label = gtk_label_new (_("To install:")); + remove_label = gtk_label_new (_("To remove:")); install_view = gtk_tree_view_new(); remove_view = gtk_tree_view_new(); @@ -2233,7 +2333,7 @@ // install view GtkTreeViewColumn *column; - column = gtk_tree_view_column_new_with_attributes ("Install packages", + column = gtk_tree_view_column_new_with_attributes (_("Install packages"), gtk_cell_renderer_text_new(), "text", 0, NULL); gtk_tree_view_append_column (GTK_TREE_VIEW (install_view), column); @@ -2245,7 +2345,7 @@ GTK_TREE_VIEW (install_view)), GTK_SELECTION_NONE);; // remove view - column = gtk_tree_view_column_new_with_attributes ("Remove packages", + column = gtk_tree_view_column_new_with_attributes (_("Remove packages"), gtk_cell_renderer_text_new(), "text", 0, NULL); gtk_tree_view_append_column (GTK_TREE_VIEW (remove_view), column); Modified: branches/tmp/mvidner/ui-as-namespace/gtk/src/YGRichText.cc URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/mvidner/ui-as-namespace/gtk/src/YGRichText.cc?rev=39838&r1=39837&r2=39838&view=diff ============================================================================== --- branches/tmp/mvidner/ui-as-namespace/gtk/src/YGRichText.cc (original) +++ branches/tmp/mvidner/ui-as-namespace/gtk/src/YGRichText.cc Tue Jul 31 14:28:02 2007 @@ -12,7 +12,6 @@ class YGRichText : public YRichText, public YGScrolledWidget { - bool m_shrinkable; bool m_plainText; public: Modified: branches/tmp/mvidner/ui-as-namespace/gtk/src/YGUtils.cc URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/mvidner/ui-as-namespace/gtk/src/YGUtils.cc?rev=39838&r1=39837&r2=39838&view=diff ============================================================================== --- branches/tmp/mvidner/ui-as-namespace/gtk/src/YGUtils.cc (original) +++ branches/tmp/mvidner/ui-as-namespace/gtk/src/YGUtils.cc Tue Jul 31 14:28:02 2007 @@ -278,25 +278,7 @@ } continue; } -#if 0 - // ignore comments - char *comment = "<!--"; - for (j = 0; j < instr[i+j] != '\0' && j < (signed) sizeof (comment); j++) - if (instr[i+j] != comment[j]) - break; - if (j == sizeof (comment)) { - comment = "-->"; - for (i = 0; instr[i] != '\0'; i++) { - for (j = 0; j < (signed) sizeof (comment); j++) { - if (instr[i+j] != comment[j]) - break; - } - if (j == sizeof (comment)) - break; - } - continue; - } -#endif + i++; skipSpace (instr, i); Modified: branches/tmp/mvidner/ui-as-namespace/gtk/src/ygtkrichtext.c URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/mvidner/ui-as-namespace/gtk/src/ygtkrichtext.c?rev=39838&r1=39837&r2=39838&view=diff ============================================================================== --- branches/tmp/mvidner/ui-as-namespace/gtk/src/ygtkrichtext.c (original) +++ branches/tmp/mvidner/ui-as-namespace/gtk/src/ygtkrichtext.c Tue Jul 31 14:28:02 2007 @@ -349,8 +349,10 @@ else if (!g_ascii_strcasecmp (element_name, "img")) { if (!g_ascii_strcasecmp (attribute_names[0], "src")) { GdkPixbuf *pixbuf = gdk_pixbuf_new_from_file (attribute_values[0], NULL); - gtk_text_buffer_insert_pixbuf (state->buffer, &iter, pixbuf); - g_object_unref (G_OBJECT (pixbuf)); + if (pixbuf) { + gtk_text_buffer_insert_pixbuf (state->buffer, &iter, pixbuf); + g_object_unref (G_OBJECT (pixbuf)); + } } else g_warning ("Unknown img attribute: '%s'", attribute_names[0]); Modified: branches/tmp/mvidner/ui-as-namespace/gtk/src/ygtksteps.c URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/mvidner/ui-as-namespace/gtk/src/ygtksteps.c?rev=39838&r1=39837&r2=39838&view=diff ============================================================================== --- branches/tmp/mvidner/ui-as-namespace/gtk/src/ygtksteps.c (original) +++ branches/tmp/mvidner/ui-as-namespace/gtk/src/ygtksteps.c Tue Jul 31 14:28:02 2007 @@ -51,7 +51,6 @@ steps->current_mark_layout = NULL; ygtk_steps_clear (steps); - GTK_OBJECT_CLASS (ygtk_steps_parent_class)->destroy (object); } Modified: branches/tmp/mvidner/ui-as-namespace/gtk/src/ygtkwizard.c URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/mvidner/ui-as-namespace/gtk/src/ygtkwizard.c?rev=39838&r1=39837&r2=39838&view=diff ============================================================================== --- branches/tmp/mvidner/ui-as-namespace/gtk/src/ygtkwizard.c (original) +++ branches/tmp/mvidner/ui-as-namespace/gtk/src/ygtkwizard.c Tue Jul 31 14:28:02 2007 @@ -564,12 +564,18 @@ if (path == NULL) return FALSE; + g_signal_handlers_block_by_func (wizard->m_navigation_widget, + (gpointer) tree_item_selected_cb, wizard); + GtkWidget *widget = wizard->m_navigation_widget; gtk_tree_view_expand_to_path (GTK_TREE_VIEW (widget), path); gtk_tree_view_set_cursor (GTK_TREE_VIEW (widget), path, NULL, FALSE); gtk_tree_view_scroll_to_cell (GTK_TREE_VIEW (widget), path, NULL, TRUE, 0.5, 0.5); + + g_signal_handlers_unblock_by_func (wizard->m_navigation_widget, + (gpointer) tree_item_selected_cb, wizard); return TRUE; } -- To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org For additional commands, e-mail: yast-commit+help@opensuse.org
participants (1)
-
mvidner@svn.opensuse.org