glom r1663 - in trunk: . glom glom/mode_data glom/utility_widgets
- From: jhs svn gnome org
- To: svn-commits-list gnome org
- Subject: glom r1663 - in trunk: . glom glom/mode_data glom/utility_widgets
- Date: Fri, 22 Aug 2008 11:37:33 +0000 (UTC)
Author: jhs
Date: Fri Aug 22 11:37:33 2008
New Revision: 1663
URL: http://svn.gnome.org/viewvc/glom?rev=1663&view=rev
Log:
2008-08-22 Johannes Schmid <johannes schmid openismus com>
* glom/application.cc:
* glom/application.h:
* glom/frame_glom.cc:
* glom/frame_glom.h:
* glom/mode_data/box_data_details.cc:
* glom/mode_data/box_data_details.h:
* glom/mode_data/notebook_data.cc:
* glom/mode_data/notebook_data.h:
Added menuitem to hide/show the layout toolbar (default: off)
* glom/utility_widgets/dragbutton.h:
Added a comment
Modified:
trunk/ChangeLog
trunk/glom/application.cc
trunk/glom/application.h
trunk/glom/frame_glom.cc
trunk/glom/frame_glom.h
trunk/glom/mode_data/box_data_details.cc
trunk/glom/mode_data/box_data_details.h
trunk/glom/mode_data/notebook_data.cc
trunk/glom/mode_data/notebook_data.h
trunk/glom/utility_widgets/dragbutton.h
Modified: trunk/glom/application.cc
==============================================================================
--- trunk/glom/application.cc (original)
+++ trunk/glom/application.cc Fri Aug 22 11:37:33 2008
@@ -484,6 +484,11 @@
action = Gtk::Action::create("GlomAction_Menu_Developer_Translations", _("_Translations"));
m_listDeveloperActions.push_back(action);
m_refActionGroup_Others->add(action, sigc::mem_fun(*this, &App_Glom::on_menu_developer_translations));
+
+ action = Gtk::ToggleAction::create("GlomAction_Menu_Developer_ShowLayoutToolbar", _("_Show Layout Toolbar"));
+ m_listDeveloperActions.push_back(action);
+ m_refActionGroup_Others->add(action, sigc::mem_fun(*this, &App_Glom::on_menu_developer_show_layout_toolbar));
+
#endif // !GLOM_ENABLE_CLIENT_ONLY
m_refUIManager->insert_action_group(m_refActionGroup_Others);
@@ -535,6 +540,8 @@
" <separator />"
" <menuitem action='GlomAction_Menu_Developer_Translations' />"
" <menuitem action='GlomAction_Menu_Developer_ChangeLanguage' />"
+ " <separator />"
+ " <menuitem action='GlomAction_Menu_Developer_ShowLayoutToolbar' />"
" </menu>"
#endif // !GLOM_ENABLE_CLIENT_ONLY
" </placeholder>"
@@ -2318,6 +2325,14 @@
}
}
+void App_Glom::on_menu_developer_show_layout_toolbar()
+{
+ Glib::RefPtr<Gtk::ToggleAction> action = Glib::RefPtr<Gtk::ToggleAction>::cast_dynamic(
+ m_refActionGroup_Others->get_action ("GlomAction_Menu_Developer_ShowLayoutToolbar"));
+ m_pFrame->show_layout_toolbar (action->get_active());
+}
+
+
void App_Glom::on_window_translations_hide()
{
if(m_window_translations)
Modified: trunk/glom/application.h
==============================================================================
--- trunk/glom/application.h (original)
+++ trunk/glom/application.h Fri Aug 22 11:37:33 2008
@@ -106,6 +106,7 @@
void on_menu_developer_changelanguage();
void on_menu_developer_translations();
void on_window_translations_hide();
+ void on_menu_developer_show_layout_toolbar();
virtual Glib::ustring ui_file_select_save(const Glib::ustring& old_file_uri); //overridden.
void on_userlevel_changed(AppState::userlevels userlevel);
Modified: trunk/glom/frame_glom.cc
==============================================================================
--- trunk/glom/frame_glom.cc (original)
+++ trunk/glom/frame_glom.cc Fri Aug 22 11:37:33 2008
@@ -728,6 +728,12 @@
{
on_menu_developer_print_layouts();
}
+
+void Frame_Glom::show_layout_toolbar (bool show)
+{
+ m_Notebook_Data.show_layout_toolbar(show);
+}
+
#endif // !GLOM_ENABLE_CLIENT_ONLY
void Frame_Glom::on_menu_Mode_Data()
Modified: trunk/glom/frame_glom.h
==============================================================================
--- trunk/glom/frame_glom.h (original)
+++ trunk/glom/frame_glom.h Fri Aug 22 11:37:33 2008
@@ -37,7 +37,6 @@
#include "mode_design/print_layouts/box_print_layouts.h"
#include "mode_design/dialog_fields.h"
#include "mode_design/dialog_relationships.h"
-#include "utility_widgets/dragbar.h"
#endif // !GLOM_ENABLE_CLIENT_ONLY
#include "dialog_connection.h"
@@ -157,6 +156,7 @@
#ifndef GLOM_ENABLE_CLIENT_ONLY
///Create the database for new documents, showing the Connection dialog
bool create_database(const Glib::ustring& database_name, const Glib::ustring& title);
+ void show_layout_toolbar (bool show = true);
#endif // !GLOM_ENABLE_CLIENT_ONLY
void export_data_to_string(Glib::ustring& the_string, const FoundSet& found_set, const Document_Glom::type_list_layout_groups& sequence);
Modified: trunk/glom/mode_data/box_data_details.cc
==============================================================================
--- trunk/glom/mode_data/box_data_details.cc (original)
+++ trunk/glom/mode_data/box_data_details.cc Fri Aug 22 11:37:33 2008
@@ -213,10 +213,7 @@
#ifndef GLOM_ENABLE_CLIENT_ONLY
m_FlowTable.set_design_mode(m_design_mode);
- if(m_design_mode)
- m_Dragbar.show();
- else
- m_Dragbar.hide();
+ m_Dragbar.hide();
#endif
}
@@ -996,6 +993,15 @@
{
dialog->set_document(m_layout_name, get_document(), m_table_name, m_FieldsShown); //TODO: Use m_TableFields?
}
+
+void Box_Data_Details::show_layout_toolbar (bool show)
+{
+ if (show)
+ m_Dragbar.show();
+ else
+ m_Dragbar.hide();
+}
+
#endif // !GLOM_ENABLE_CLIENT_ONLY
} //namespace Glom
Modified: trunk/glom/mode_data/box_data_details.h
==============================================================================
--- trunk/glom/mode_data/box_data_details.h (original)
+++ trunk/glom/mode_data/box_data_details.h Fri Aug 22 11:37:33 2008
@@ -63,6 +63,9 @@
typedef sigc::signal<void, const Glib::ustring&, Gnome::Gda::Value> type_signal_requested_related_details;
type_signal_requested_related_details signal_requested_related_details();
+#ifndef GLOM_ENABLE_CLIENT_ONLY
+ virtual void show_layout_toolbar (bool show = true);
+#endif
protected:
Modified: trunk/glom/mode_data/notebook_data.cc
==============================================================================
--- trunk/glom/mode_data/notebook_data.cc (original)
+++ trunk/glom/mode_data/notebook_data.cc Fri Aug 22 11:37:33 2008
@@ -254,6 +254,12 @@
pBox->show_layout_dialog();
}
}
+
+void Notebook_Data::show_layout_toolbar(bool show)
+{
+ m_Box_Details.show_layout_toolbar(show);
+}
+
#endif // !GLOM_ENABLE_CLIENT_ONLY
void Notebook_Data::do_menu_file_print()
Modified: trunk/glom/mode_data/notebook_data.h
==============================================================================
--- trunk/glom/mode_data/notebook_data.h (original)
+++ trunk/glom/mode_data/notebook_data.h Fri Aug 22 11:37:33 2008
@@ -54,6 +54,7 @@
#ifndef GLOM_ENABLE_CLIENT_ONLY
virtual void do_menu_developer_layout(); //override
+ void show_layout_toolbar(bool show = true);
#endif // !GLOM_ENABLE_CLIENT_ONLY
virtual void do_menu_file_print(); //override
Modified: trunk/glom/utility_widgets/dragbutton.h
==============================================================================
--- trunk/glom/utility_widgets/dragbutton.h (original)
+++ trunk/glom/utility_widgets/dragbutton.h Fri Aug 22 11:37:33 2008
@@ -39,6 +39,7 @@
//TODO: What is this for? murrayc.
+ // We need an unique identifier for drag & drop! jhs
static const gchar* get_target()
{
return "flowtable";
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]