[gnote] Replace Boxes with Grid in note window
- From: Aurimas Černius <aurimasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnote] Replace Boxes with Grid in note window
- Date: Sun, 26 May 2013 12:19:48 +0000 (UTC)
commit 61caef452434c8a12e5b80a13f80e744abddb4b7
Author: Aurimas Černius <aurisc4 gmail com>
Date: Sat May 25 18:35:06 2013 +0300
Replace Boxes with Grid in note window
src/notewindow.cpp | 23 ++++++++++++-----------
src/notewindow.hpp | 6 +++---
2 files changed, 15 insertions(+), 14 deletions(-)
---
diff --git a/src/notewindow.cpp b/src/notewindow.cpp
index 041eb4f..0cdfefa 100644
--- a/src/notewindow.cpp
+++ b/src/notewindow.cpp
@@ -60,8 +60,7 @@ namespace gnote {
NoteWindow::NoteWindow(Note & note)
- : Gtk::VBox(false, 2)
- , m_note(note)
+ : m_note(note)
, m_name(note.get_title())
, m_height(360)
, m_width(450)
@@ -109,12 +108,14 @@ namespace gnote {
m_editor_window->property_hscrollbar_policy().set_value(Gtk::POLICY_AUTOMATIC);
m_editor_window->property_vscrollbar_policy().set_value(Gtk::POLICY_AUTOMATIC);
m_editor_window->add(*m_editor);
+ m_editor_window->set_hexpand(true);
+ m_editor_window->set_vexpand(true);
m_editor_window->show();
set_focus_child(*m_editor);
- pack_start(*m_template_widget, false, false, 0);
- pack_start(*m_editor_window, true, true, 0);
+ attach(*m_template_widget, 0, 0, 1, 1);
+ attach(*m_editor_window, 0, 1, 1, 1);
}
@@ -423,9 +424,9 @@ namespace gnote {
}
- Gtk::Box * NoteWindow::make_template_bar()
+ Gtk::Grid * NoteWindow::make_template_bar()
{
- Gtk::VBox * bar = manage(new Gtk::VBox());
+ Gtk::Grid * bar = manage(new Gtk::Grid);
Gtk::Label * infoLabel = manage(new Gtk::Label(
_("This note is a template note. It determines the default content of regular notes, and will not show
up in the note menu or search window.")));
@@ -446,11 +447,11 @@ namespace gnote {
m_save_title_check_button->set_active(m_note.contains_tag(m_template_save_title_tag));
m_save_title_check_button->signal_toggled().connect(sigc::mem_fun(*this,
&NoteWindow::on_save_title_check_button_toggled));
- bar->pack_start(*infoLabel);
- bar->pack_start(*untemplateButton);
- bar->pack_start(*m_save_size_check_button);
- bar->pack_start(*m_save_selection_check_button);
- bar->pack_start(*m_save_title_check_button);
+ bar->attach(*infoLabel, 0, 0, 1, 1);
+ bar->attach(*untemplateButton, 0, 1, 1, 1);
+ bar->attach(*m_save_size_check_button, 0, 2, 1, 1);
+ bar->attach(*m_save_selection_check_button, 0, 3, 1, 1);
+ bar->attach(*m_save_title_check_button, 0, 4, 1, 1);
if(m_note.contains_tag(m_template_tag)) {
bar->show_all();
diff --git a/src/notewindow.hpp b/src/notewindow.hpp
index dff9d42..9cb75a4 100644
--- a/src/notewindow.hpp
+++ b/src/notewindow.hpp
@@ -129,7 +129,7 @@ private:
};
class NoteWindow
- : public Gtk::VBox
+ : public Gtk::Grid
, public EmbeddableWidget
, public SearchableItem
, public HasEmbeddableToolbar
@@ -198,7 +198,7 @@ private:
void on_populate_popup(Gtk::Menu*);
Gtk::Grid *make_toolbar();
Gtk::Menu * make_plugin_menu();
- Gtk::Box * make_template_bar();
+ Gtk::Grid * make_template_bar();
void on_untemplate_button_click();
void on_save_size_check_button_toggled();
void on_save_selection_check_button_toggled();
@@ -231,7 +231,7 @@ private:
Gtk::ScrolledWindow *m_editor_window;
NoteFindHandler m_find_handler;
Gtk::ToolButton *m_delete_button;
- Gtk::Box *m_template_widget;
+ Gtk::Grid *m_template_widget;
Gtk::CheckButton *m_save_size_check_button;
Gtk::CheckButton *m_save_selection_check_button;
Gtk::CheckButton *m_save_title_check_button;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]