~ubuntu-core-dev/synaptic/ubuntu

« back to all changes in this revision

Viewing changes to gtk/rgmainwindow.cc

  • Committer: mvo
  • Date: 2004-10-04 23:40:33 UTC
  • Revision ID: gustavo@niemeyer.net-20041004234033-c99a2c5f29e39884
* merged changes from the 0.53 branch
* added "AND/OR" mode for the pattern filter with GUI

Show diffs side-by-side

added added

removed removed

Lines of Context:
68
68
#include "sections_trans.h"
69
69
 
70
70
// icons and pixmaps
71
 
#include "synaptic_mini.xpm"
 
71
#include "synaptic.xpm"
72
72
 
73
73
#include "i18n.h"
74
74
 
170
170
      GtkTreeSelection *selection;
171
171
      GtkTreeModel *model;
172
172
      GtkTreeIter iter;
173
 
      const char *str;
 
173
      const char *str = NULL;
174
174
 
175
175
      selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(_subViewList));
176
176
      model = gtk_tree_view_get_model(GTK_TREE_VIEW(_subViewList));
177
177
      bool ok =  gtk_tree_model_get_iter_first(model, &iter); 
178
178
      while(ok) {
179
179
         gtk_tree_model_get(model, &iter, 0, &str, -1);
180
 
         if(strcoll(str, selected.c_str()) == 0) {
 
180
         if(str && strcoll(str, selected.c_str()) == 0) {
181
181
            gtk_tree_selection_select_iter(selection, &iter);
182
182
            return;
183
183
         }
251
251
         
252
252
         // check if first item is selected ("All")
253
253
         gchar *str=gtk_tree_model_get_string_from_iter(model, &iter);
254
 
         if(str[0] == '0')
 
254
         if(str[0] == '0' || subView == NULL)
255
255
            ret = "";
256
256
         else
257
257
            ret = subView;
348
348
   gtk_widget_set_sensitive(_purgeM, FALSE);
349
349
   gtk_widget_set_sensitive(_pkgReconfigureM, FALSE);
350
350
   gtk_widget_set_sensitive(_pkgHelpM, FALSE);
351
 
   gtk_widget_set_sensitive(_pkginfo, false);
 
351
   gtk_widget_set_sensitive(_pkginfo, FALSE);
352
352
   gtk_widget_set_sensitive(_dl_changelogM, FALSE);
353
353
   gtk_widget_set_sensitive(_detailsM, FALSE);
354
354
   gtk_widget_set_sensitive(_propertiesB, FALSE);
1009
1009
 
1010
1010
 
1011
1011
   GdkPixbuf *icon = gdk_pixbuf_new_from_xpm_data((const char **)
1012
 
                                                  synaptic_mini_xpm);
 
1012
                                                  synaptic_xpm);
1013
1013
   gtk_window_set_icon(GTK_WINDOW(_win), icon);
1014
1014
 
1015
1015
   gtk_window_resize(GTK_WINDOW(_win),
1207
1207
   gtk_tooltips_set_tip(GTK_TOOLTIPS(_tooltips), button,
1208
1208
                        _("Apply all marked changes"), "");
1209
1209
 
1210
 
   _pkgCommonTextView = glade_xml_get_widget(_gladeXML, "textview_pkgcommon");
 
1210
   _pkgCommonTextView = glade_xml_get_widget(_gladeXML, "text_descr");
1211
1211
   assert(_pkgCommonTextView);
1212
1212
   gtk_text_view_set_wrap_mode(GTK_TEXT_VIEW(_pkgCommonTextView),
1213
1213
                               GTK_WRAP_WORD);
2248
2248
 
2249
2249
void RGMainWindow::cbShowFilterManagerWindow(GtkWidget *self, void *data)
2250
2250
{
 
2251
#if 0
2251
2252
   RGMainWindow *me = (RGMainWindow *) data;
2252
2253
 
2253
2254
   if (me->_fmanagerWin == NULL) {
2257
2258
   }
2258
2259
 
2259
2260
   me->_fmanagerWin->show();
 
2261
#endif
 
2262
   if (me->_fmanagerWin == NULL) {
 
2263
      me->_fmanagerWin = new RGFilterManagerWindow(me, me->_lister->filterView());
 
2264
 
 
2265
   }
 
2266
   gtk_dialog_run(GTK_DIALOG(me->_fmanagerWin->window()));
2260
2267
 
2261
2268
}
2262
2269