Index: gtk/rgpkgdetails.cc =================================================================== --- gtk/rgpkgdetails.cc (revision 1107) +++ gtk/rgpkgdetails.cc (working copy) @@ -29,21 +29,15 @@ #include "rpackage.h" #include "sections_trans.h" -RGPkgDetailsWindow::RGPkgDetailsWindow(RGWindow *parent, RPackage *pkg) +RGPkgDetailsWindow::RGPkgDetailsWindow(RGWindow *parent) : RGGladeWindow(parent, "details") { - gchar *str = g_strdup_printf(_("%s Properties"),pkg->name()); - setTitle(str); - g_free(str); - glade_xml_signal_connect_data(_gladeXML, "on_button_close_clicked", G_CALLBACK(cbCloseClicked), this); // fill in all the pkg-values - fillInValues(pkg); skipTaskbar(true); - show(); } void RGPkgDetailsWindow::cbCloseClicked(GtkWidget *self, void *data) @@ -102,6 +96,10 @@ void RGPkgDetailsWindow::fillInValues(RPackage *pkg) { + gchar *str = g_strdup_printf(_("%s Properties"),pkg->name()); + setTitle(str); + g_free(str); + char *pkg_summary = g_strdup_printf("%s\n%s", pkg->name(), pkg->summary()); setTextView("textview_pkgcommon", pkg_summary, true); Index: gtk/window_details.glade =================================================================== --- gtk/window_details.glade (revision 1107) +++ gtk/window_details.glade (working copy) @@ -2,14 +2,13 @@ - 6 GTK_WINDOW_TOPLEVEL GTK_WIN_POS_NONE - True + False 540 True False Index: gtk/rgmainwindow.cc =================================================================== --- gtk/rgmainwindow.cc (revision 1110) +++ gtk/rgmainwindow.cc (working copy) @@ -31,6 +31,7 @@ #include #include #include +#include #include #include #include @@ -413,6 +414,9 @@ img = get_gtk_image("package-installed-updated"); gtk_image_menu_item_set_image(GTK_IMAGE_MENU_ITEM(_keepM), img); + if(_pkgDetails != NULL) + _pkgDetails->fillInValues(pkg); + setStatusText(); } @@ -640,7 +644,7 @@ RGMainWindow::RGMainWindow(RPackageLister *packLister, string name) : RGGladeWindow(NULL, name), _lister(packLister), _pkgList(0), - _treeView(0), _iconLegendPanel(0) + _treeView(0), _iconLegendPanel(0), _pkgDetails(0) { assert(_win); @@ -877,6 +881,24 @@ } +gboolean RGMainWindow::cbKeyPressedInTreeView(GtkWidget *widget, GdkEventKey *event, gpointer data) +{ + RGMainWindow *me = (RGMainWindow *)data; + gboolean res; + + // only react if key is in sane range + if(event->keyval < GDK_0 || event->keyval > GDK_z) { + return FALSE; + } + + // start interactive search + g_signal_emit_by_name(G_OBJECT(me->_treeView), + "start-interactive-search", res); + gdk_event_put((GdkEvent*)(event)); + + return TRUE; +} + void RGMainWindow::buildInterface() { GtkWidget *img, *menuitem, *widget, *button; @@ -1357,8 +1379,15 @@ gtk_tree_selection_set_mode(select, GTK_SELECTION_SINGLE); g_signal_connect(G_OBJECT(select), "changed", G_CALLBACK(cbChangedSubView), this); + + g_signal_connect(G_OBJECT(_treeView), "key-press-event", + G_CALLBACK(cbKeyPressedInTreeView), this); + } + + + void RGMainWindow::pkgInstallHelper(RPackage *pkg, bool fixBroken, bool reInstall) { @@ -1908,11 +1937,14 @@ assert(data); RPackage *pkg = me->selectedPackage(); - if (pkg != NULL) { - RGPkgDetailsWindow win(me, pkg); - win.show(); - gtk_main(); - } + if (pkg == NULL) + return; + + if(me->_pkgDetails == NULL) + me->_pkgDetails = new RGPkgDetailsWindow(me); + + me->_pkgDetails->fillInValues(pkg); + me->_pkgDetails->show(); } void RGMainWindow::cbShowSourcesWindow(GtkWidget *self, void *data) @@ -2749,7 +2781,7 @@ GtkWidget *menu = gtk_menu_new(); GtkWidget *item; vector deps = pkg->enumDeps(); - for(int i=0;i pkgs = _lister->getPackages(); - for(int k=0;k d = pkgs[k]->provides(); - for(int j=0;jname()); Index: gtk/rgmainwindow.h =================================================================== --- gtk/rgmainwindow.h (revision 1107) +++ gtk/rgmainwindow.h (working copy) @@ -38,8 +38,8 @@ #include "rggladewindow.h" #include "rgiconlegend.h" #include "gtkpkglist.h" +#include "rgpkgdetails.h" - #define TOOLBAR_HIDE -1 class RGSourcesWindow; @@ -149,6 +149,8 @@ RGAboutPanel *_aboutPanel; RGIconLegendPanel *_iconLegendPanel; + RGPkgDetailsWindow *_pkgDetails; + RGCacheProgress *_cacheProgress; RGUserDialog *_userDialog; @@ -183,6 +185,7 @@ RPackage *selectedPackage(); string selectedSubView(); + static gboolean cbKeyPressedInTreeView(GtkWidget *widget, GdkEventKey *event, gpointer data); // helpers void pkgAction(RGPkgAction action); Index: gtk/rgpkgdetails.h =================================================================== --- gtk/rgpkgdetails.h (revision 1107) +++ gtk/rgpkgdetails.h (working copy) @@ -31,7 +31,6 @@ class RGPkgDetailsWindow : public RGGladeWindow { protected: - void fillInValues(RPackage *pkg); vector formatDepInformation(vector deps); static void cbDependsMenuChanged(GtkWidget *self, void *data); @@ -39,7 +38,8 @@ static void cbCloseClicked(GtkWidget *self, void *data); public: - RGPkgDetailsWindow(RGWindow *parent, RPackage *pkg); + RGPkgDetailsWindow(RGWindow *parent); + void fillInValues(RPackage *pkg); ~RGPkgDetailsWindow(); }; #endif