paperbox r135 - in trunk: . src ui



Author: markoa
Date: Sat Apr 26 15:58:45 2008
New Revision: 135
URL: http://svn.gnome.org/viewvc/paperbox?rev=135&view=rev

Log:
Amortise growing category view

Modified:
   trunk/ChangeLog
   trunk/src/category-view.cc
   trunk/src/category-view.hh
   trunk/src/main-window.cc
   trunk/ui/window-main.glade

Modified: trunk/src/category-view.cc
==============================================================================
--- trunk/src/category-view.cc	(original)
+++ trunk/src/category-view.cc	Sat Apr 26 15:58:45 2008
@@ -31,9 +31,11 @@
     {
         // pack the widgets
         label_title.set_markup(_("<b>Categories</b>"));
-
         parent->pack_start(label_title, false, false);
-        parent->pack_start(treeview, true, true);
+
+        scroll.set_policy(Gtk::POLICY_AUTOMATIC, Gtk::POLICY_AUTOMATIC);
+        scroll.add(treeview);
+        parent->pack_start(scroll, true, true);
 
         // create the tree model
         treemodel = Gtk::ListStore::create(columns);

Modified: trunk/src/category-view.hh
==============================================================================
--- trunk/src/category-view.hh	(original)
+++ trunk/src/category-view.hh	Sat Apr 26 15:58:45 2008
@@ -27,6 +27,7 @@
 #include <gtkmm/box.h>
 #include <gtkmm/label.h>
 #include <gtkmm/liststore.h>
+#include <gtkmm/scrolledwindow.h>
 #include <gtkmm/treeview.h>
 
 namespace paperbox {
@@ -50,11 +51,12 @@
 
         virtual void select_first();
 
-        Gtk::Box*                        parent;
-        Gtk::Label                       label_title;
-        Gtk::TreeView                    treeview;
-        CategoryModelColumns             columns;
-        Glib::RefPtr<Gtk::ListStore>     treemodel;
+        Gtk::Box* parent;
+        Gtk::Label label_title;
+        Gtk::ScrolledWindow scroll;
+        Gtk::TreeView treeview;
+        CategoryModelColumns columns;
+        Glib::RefPtr<Gtk::ListStore> treemodel;
         Glib::RefPtr<Gtk::TreeSelection> selection;
     };
 

Modified: trunk/src/main-window.cc
==============================================================================
--- trunk/src/main-window.cc	(original)
+++ trunk/src/main-window.cc	Sat Apr 26 15:58:45 2008
@@ -113,7 +113,7 @@
         tag_box_(false, 4)
     {
         init_gui();
-        set_default_size(800, 670);
+        set_default_size(800, 690);
         setup_pane_pos();
 
         browser_ = Browser::instance();
@@ -156,6 +156,8 @@
 
         setup_categories();
 
+        right_vpane_->set_position(280);
+
         show_all_children();
     }
 

Modified: trunk/ui/window-main.glade
==============================================================================
--- trunk/ui/window-main.glade	(original)
+++ trunk/ui/window-main.glade	Sat Apr 26 15:58:45 2008
@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="UTF-8" standalone="no"?>
 <!DOCTYPE glade-interface SYSTEM "glade-2.0.dtd">
-<!--Generated with glade3 3.4.0 on Fri Jan  4 01:12:28 2008 -->
+<!--Generated with glade3 3.4.2 on Sat Apr 26 17:38:32 2008 -->
 <glade-interface>
   <widget class="GtkWindow" id="MainWindow">
     <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
@@ -54,7 +54,7 @@
                         </child>
                       </widget>
                       <packing>
-                        <property name="resize">False</property>
+                        <property name="resize">True</property>
                         <property name="shrink">True</property>
                       </packing>
                     </child>



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]