paperbox r191 - in trunk: . src ui
- From: markoa svn gnome org
- To: svn-commits-list gnome org
- Subject: paperbox r191 - in trunk: . src ui
- Date: Tue, 30 Sep 2008 16:04:06 +0000 (UTC)
Author: markoa
Date: Tue Sep 30 16:04:06 2008
New Revision: 191
URL: http://svn.gnome.org/viewvc/paperbox?rev=191&view=rev
Log:
Put the edit categories button next to the label
Modified:
trunk/ChangeLog
trunk/src/category-editor.cc
trunk/src/category-view.cc
trunk/src/category-view.hh
trunk/src/main-window.cc
trunk/src/main-window.hh
trunk/ui/window-main.glade
Modified: trunk/src/category-editor.cc
==============================================================================
--- trunk/src/category-editor.cc (original)
+++ trunk/src/category-editor.cc Tue Sep 30 16:04:06 2008
@@ -95,7 +95,8 @@
{
get_widgets();
- category_view_.reset(new CategoryView(vbox_left_));
+ bool no_edit_button = false;
+ category_view_.reset(new CategoryView(vbox_left_, no_edit_button));
vbox_left_->pack_start(button_new_, false, false);
vbox_left_->pack_start(button_delete_, false, false);
Modified: trunk/src/category-view.cc
==============================================================================
--- trunk/src/category-view.cc (original)
+++ trunk/src/category-view.cc Tue Sep 30 16:04:06 2008
@@ -22,17 +22,22 @@
#include <glib/gi18n.h>
#include "category-view.hh"
+#include <gtkmm/stock.h>
#include "i18n-utils.hh"
namespace paperbox {
- CategoryView::CategoryView(Gtk::Box* _parent)
+ CategoryView::CategoryView(Gtk::Box* _parent, bool edit_enabled)
:
- parent(_parent)
+ parent(_parent),
+ button_edit(Gtk::Stock::EDIT)
{
// pack the widgets
label_title.set_markup(boldify(_("Categories")));
- parent->pack_start(label_title, false, false);
+ title_box.pack_start(label_title);
+ if (edit_enabled)
+ title_box.pack_start(button_edit, false, false);
+ parent->pack_start(title_box, false, false);
scroll.set_policy(Gtk::POLICY_AUTOMATIC, Gtk::POLICY_AUTOMATIC);
scroll.add(treeview);
Modified: trunk/src/category-view.hh
==============================================================================
--- trunk/src/category-view.hh (original)
+++ trunk/src/category-view.hh Tue Sep 30 16:04:06 2008
@@ -46,12 +46,14 @@
class CategoryView : private boost::noncopyable
{
public:
- explicit CategoryView(Gtk::Box* parent);
+ explicit CategoryView(Gtk::Box* parent, bool edit_enabled = true);
virtual ~CategoryView() {}
virtual void select_first();
Gtk::Box* parent;
+ Gtk::HBox title_box;
+ Gtk::Button button_edit;
Gtk::Label label_title;
Gtk::ScrolledWindow scroll;
Gtk::TreeView treeview;
Modified: trunk/src/main-window.cc
==============================================================================
--- trunk/src/main-window.cc (original)
+++ trunk/src/main-window.cc Tue Sep 30 16:04:06 2008
@@ -113,7 +113,6 @@
right_top_vbox_(0),
right_vpane_(0),
category_vbox_(0),
- button_edit_category_(Gtk::Stock::EDIT),
tag_cloud_vbox_(0),
tag_box_(false, 4)
{
@@ -272,7 +271,6 @@
MainWindow::setup_categories()
{
category_view_.reset(new CategoryView(category_vbox_));
- category_vbox_->pack_start(button_edit_category_, false, false);
category_view_->selection->set_select_function(
sigc::mem_fun(*this, &MainWindow::on_category_selected));
@@ -414,7 +412,7 @@
tile_view_->signal_tile_activated().connect(
sigc::mem_fun(*this, &MainWindow::on_document_tile_selected));
- button_edit_category_.signal_clicked().connect(
+ category_view_->button_edit.signal_clicked().connect(
sigc::mem_fun(*this, &MainWindow::on_edit_category));
tile_view_->signal_tag_clicked().connect(
Modified: trunk/src/main-window.hh
==============================================================================
--- trunk/src/main-window.hh (original)
+++ trunk/src/main-window.hh Tue Sep 30 16:04:06 2008
@@ -118,7 +118,6 @@
Glib::ustring selected_cat_name_;
Gtk::HBox* category_buttons_hbox_;
- Gtk::Button button_edit_category_;
boost::shared_ptr<CategoryModel> category_model_;
Modified: trunk/ui/window-main.glade
==============================================================================
--- trunk/ui/window-main.glade (original)
+++ trunk/ui/window-main.glade Tue Sep 30 16:04:06 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.5 on Sun Aug 24 13:26:01 2008 -->
+<!--Generated with glade3 3.4.5 on Tue Sep 30 17:56:09 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>
@@ -60,9 +60,6 @@
<child>
<placeholder/>
</child>
- <child>
- <placeholder/>
- </child>
</widget>
<packing>
<property name="resize">True</property>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]