Commit 17a5278b authored by Murray Cumming's avatar Murray Cumming
Browse files

gmenu: More conversion to Gio::Menu

Convert the main menu, and some of the context menus.
parent d7e6c654
This diff is collapsed.
......@@ -35,7 +35,6 @@
#include <gtkmm/menu.h>
#include <gtkmm/toolbar.h>
#include <gtkmm/handlebox.h>
#include <gtkmm/uimanager.h>
#include <gtkmm/builder.h>
#include <gtkmm/applicationwindow.h>
......@@ -86,8 +85,8 @@ public:
void update_network_shared_ui();
#ifndef GLOM_ENABLE_CLIENT_ONLY
void add_developer_action(const Glib::RefPtr<Gtk::Action>& refAction);
void remove_developer_action(const Glib::RefPtr<Gtk::Action>& refAction);
void add_developer_action(const Glib::RefPtr<Gio::SimpleAction>& refAction);
void remove_developer_action(const Glib::RefPtr<Gio::SimpleAction>& refAction);
/** Show in the UI whether the document is in developer or operator mode.
*/
......@@ -174,8 +173,6 @@ protected:
virtual void init_menus_file(); //Call this from init_menus() to add the standard file menu.
virtual void init_menus_edit(); //Call this from init_menus() to add the standard edit menu
void add_ui_from_string(const Glib::ustring& ui_description); //Convenience function
virtual void on_hide(); //override.
//Overrides from AppWindow_WithDoc:
......@@ -202,19 +199,23 @@ protected:
void on_menu_edit_copy_activate();
void on_menu_edit_cut_activate();
void on_menu_edit_paste_activate();
void on_menu_edit_find();
void on_recent_files_activate(Gtk::RecentChooser& recent_chooser);
//UIManager and Actions
Glib::RefPtr<Gtk::UIManager> m_refUIManager;
Glib::RefPtr<Gtk::ActionGroup> m_refFileActionGroup;
Glib::RefPtr<Gtk::ActionGroup> m_refEditActionGroup;
//Menu Builder and Actions
Gtk::MenuBar* m_menubar;
Glib::RefPtr<Gtk::Builder> m_builder_menu;
Glib::RefPtr<Gio::SimpleActionGroup> m_refActionGroup_File,
m_refActionGroup_Edit, m_refActionGroup_Tables,
m_refActionGroup_Developer, m_refActionGroup_Reports;
//Member widgets:
Gtk::Box* m_pVBox;
Gtk::Box m_VBox_PlaceHolder;
//Menu stuff:
Glib::RefPtr<Gtk::Action> m_action_save, m_action_saveas;
Glib::RefPtr<Gio::SimpleAction> m_action_save, m_action_saveas;
protected:
virtual void ui_warning_load_failed(int failure_code = 0); //Override.
......@@ -237,16 +238,14 @@ private:
void existing_or_new_new();
void on_menu_file_toggle_share();
void on_menu_developer_developer();
void on_menu_developer_operator();
void on_menu_developer_usermode(int parameter);
void on_menu_file_save_as_example();
void on_menu_developer_changelanguage();
void on_menu_developer_translations();
void on_menu_developer_active_platform_normal();
void on_menu_developer_active_platform_maemo();
void on_menu_developer_active_platform(const Glib::ustring& parameter);
void on_menu_developer_export_backup();
void on_menu_developer_restore_backup();
void on_menu_developer_enable_layout_drag_and_drop ();
void on_menu_developer_enable_layout_drag_and_drop();
void on_window_translations_hide();
......@@ -289,19 +288,18 @@ private:
//Widgets:
Glib::RefPtr<Gtk::ActionGroup> m_refActionGroup_Others;
typedef std::list< Glib::RefPtr<Gtk::Action> > type_listActions;
typedef std::list< Glib::RefPtr<Gio::SimpleAction> > type_listActions;
type_listActions m_listDeveloperActions; //Only enabled when in developer mode.
type_listActions m_listTableSensitiveActions; // Only enabled when a table is loaded.
Glib::RefPtr<Gtk::Action> m_action_mode_find;
Glib::RefPtr<Gio::SimpleAction> m_action_mode_find;
#ifndef GLOM_ENABLE_CLIENT_ONLY
Glib::RefPtr<Gtk::Action> m_action_developer_users;
Glib::RefPtr<Gtk::RadioAction> m_action_menu_developer_developer, m_action_menu_developer_operator;
Glib::RefPtr<Gtk::ToggleAction> m_action_enable_layout_drag_and_drop ;
Glib::RefPtr<Gio::SimpleAction> m_action_developer_users;
Glib::RefPtr<Gio::SimpleAction> m_action_menu_developer_usermode;
Glib::RefPtr<Gio::SimpleAction> m_action_menu_developer_active_platform;
Glib::RefPtr<Gio::SimpleAction> m_action_enable_layout_drag_and_drop ;
#endif // !GLOM_ENABLE_CLIENT_ONLY
Glib::RefPtr<Gtk::ToggleAction> m_toggleaction_network_shared;
Glib::RefPtr<Gio::SimpleAction> m_toggleaction_network_shared;
sigc::connection m_connection_toggleaction_network_shared;
Gtk::Box* m_pBoxTop;
......@@ -318,10 +316,9 @@ private:
#endif // !GLOM_ENABLE_CLIENT_ONLY
Glib::RefPtr<Gtk::ActionGroup> m_refHelpActionGroup;
Glib::RefPtr<Gtk::ActionGroup> m_refNavTablesActionGroup, m_refNavReportsActionGroup, m_refNavPrintLayoutsActionGroup;
Glib::RefPtr<Gio::SimpleActionGroup> m_refHelpActionGroup;
Glib::RefPtr<Gio::SimpleActionGroup> m_refNavTablesActionGroup, m_refNavReportsActionGroup, m_refNavPrintLayoutsActionGroup;
type_listActions m_listNavTableActions, m_listNavReportActions, m_listNavPrintLayoutActions;
Gtk::UIManager::ui_merge_id m_menu_tables_ui_merge_id, m_menu_reports_ui_merge_id, m_menu_print_layouts_ui_merge_id;
#ifndef GLOM_ENABLE_CLIENT_ONLY
//Set these before calling offer_saveas() (which uses ui_file_select_save()), and clear it afterwards.
......
......@@ -62,7 +62,6 @@
#include <glom/print_layout/print_layout_utils.h>
#include <glom/filechooser_export.h>
#include <gtkmm/radioaction.h>
#include <libglom/privs.h>
#include <libglom/db_utils.h>
#include <sstream> //For stringstream.
......@@ -452,95 +451,81 @@ void Frame_Glom::show_no_table()
}
#ifndef GLOM_ENABLE_CLIENT_ONLY
void Frame_Glom::on_menu_developer_developer(const Glib::RefPtr<Gtk::RadioAction>& action, const Glib::RefPtr<Gtk::RadioAction>& operator_action)
bool Frame_Glom::attempt_change_usermode_to_developer()
{
if(action && action->get_active())
{
Document* document = dynamic_cast<Document*>(get_document());
if(document)
{
//Check whether the current user has developer privileges:
ConnectionPool* connection_pool = ConnectionPool::get_instance();
sharedptr<SharedConnection> sharedconnection = connection_pool->connect();
// Default to true; if we don't support users, we always have
// priviliges to change things in developer mode.
bool test = true;
Document* document = dynamic_cast<Document*>(get_document());
if(!document)
return false;
if(sharedconnection && sharedconnection->get_gda_connection()->supports_feature(Gnome::Gda::CONNECTION_FEATURE_USERS))
{
test = Privs::get_user_is_in_group(connection_pool->get_user(), GLOM_STANDARD_GROUP_NAME_DEVELOPER);
}
//Check whether the current user has developer privileges:
ConnectionPool* connection_pool = ConnectionPool::get_instance();
sharedptr<SharedConnection> sharedconnection = connection_pool->connect();
if(test)
{
std::cout << "DEBUG: User=" << connection_pool->get_user() << " _is_ in the developer group on the server." << std::endl;
//Avoid double signals:
//if(document->get_userlevel() != AppState::USERLEVEL_DEVELOPER)
test = document->set_userlevel(AppState::USERLEVEL_DEVELOPER);
if(!test)
std::cout << " DEBUG: But document->set_userlevel(AppState::USERLEVEL_DEVELOPER) failed." << std::endl;
}
else
{
std::cout << "DEBUG: User=" << connection_pool->get_user() << " is _not_ in the developer group on the server." << std::endl;
}
// Default to true; if we don't support users, we always have
// priviliges to change things in developer mode.
bool test = true;
//If this was not possible then revert the menu:
if(!test)
{
if(document->get_opened_from_browse())
{
//TODO: Obviously this could be possible but it would require a network protocol and some work:
Gtk::MessageDialog dialog(Utils::bold_message(_("Developer mode not available.")), true, Gtk::MESSAGE_WARNING);
dialog.set_secondary_text(_("Developer mode is not available because the file was opened over the network from a running Glom. Only the original file may be edited."));
dialog.set_transient_for(*get_app_window());
dialog.run();
}
else
{
Gtk::MessageDialog dialog(Utils::bold_message(_("Developer mode not available")), true, Gtk::MESSAGE_WARNING);
dialog.set_secondary_text(_("Developer mode is not available. Check that you have sufficient database access rights and that the glom file is not read-only."));
dialog.set_transient_for(*get_app_window());
dialog.run();
}
}
else if(document->get_document_format_version() < Document::get_latest_known_document_format_version())
{
Gtk::MessageDialog dialog(Utils::bold_message(_("Saving in new document format")), true, Gtk::MESSAGE_QUESTION, Gtk::BUTTONS_NONE);
dialog.set_secondary_text(_("The document was created by an earlier version of the application. Making changes to the document will mean that the document cannot be opened by some earlier versions of the application."));
dialog.set_transient_for(*get_app_window());
dialog.add_button(_("_Cancel"), Gtk::RESPONSE_CANCEL);
dialog.add_button(_("Continue"), Gtk::RESPONSE_OK);
const int response = dialog.run();
test = (response == Gtk::RESPONSE_OK);
}
if(!test)
{
//Abort the change of user level:
if(sharedconnection && sharedconnection->get_gda_connection()->supports_feature(Gnome::Gda::CONNECTION_FEATURE_USERS))
{
test = Privs::get_user_is_in_group(connection_pool->get_user(), GLOM_STANDARD_GROUP_NAME_DEVELOPER);
}
//This causes an endless loop, but it is not recursive so we can't block it.
//TODO: Submit GTK+ bug.
//action->set_active(false);
operator_action->set_active();
}
}
if(test)
{
std::cout << "DEBUG: User=" << connection_pool->get_user() << " _is_ in the developer group on the server." << std::endl;
//Avoid double signals:
//if(document->get_userlevel() != AppState::USERLEVEL_DEVELOPER)
test = document->set_userlevel(AppState::USERLEVEL_DEVELOPER);
if(!test)
std::cout << " DEBUG: But document->set_userlevel(AppState::USERLEVEL_DEVELOPER) failed." << std::endl;
}
else
{
std::cout << "DEBUG: User=" << connection_pool->get_user() << " is _not_ in the developer group on the server." << std::endl;
}
}
void Frame_Glom::on_menu_developer_operator(const Glib::RefPtr<Gtk::RadioAction>& action)
{
if(action && action->get_active())
//If this was not possible then revert the menu:
if(!test)
{
Document* document = dynamic_cast<Document*>(get_document());
if(document)
if(document->get_opened_from_browse())
{
//TODO: Obviously this could be possible but it would require a network protocol and some work:
Gtk::MessageDialog dialog(Utils::bold_message(_("Developer mode not available.")), true, Gtk::MESSAGE_WARNING);
dialog.set_secondary_text(_("Developer mode is not available because the file was opened over the network from a running Glom. Only the original file may be edited."));
dialog.set_transient_for(*get_app_window());
dialog.run();
}
else
{
//Avoid double signals:
//if(document->get_userlevel() != AppState::USERLEVEL_OPERATOR)
document->set_userlevel(AppState::USERLEVEL_OPERATOR);
Gtk::MessageDialog dialog(Utils::bold_message(_("Developer mode not available")), true, Gtk::MESSAGE_WARNING);
dialog.set_secondary_text(_("Developer mode is not available. Check that you have sufficient database access rights and that the glom file is not read-only."));
dialog.set_transient_for(*get_app_window());
dialog.run();
}
}
else if(document->get_document_format_version() < Document::get_latest_known_document_format_version())
{
Gtk::MessageDialog dialog(Utils::bold_message(_("Saving in new document format")), true, Gtk::MESSAGE_QUESTION, Gtk::BUTTONS_NONE);
dialog.set_secondary_text(_("The document was created by an earlier version of the application. Making changes to the document will mean that the document cannot be opened by some earlier versions of the application."));
dialog.set_transient_for(*get_app_window());
dialog.add_button(_("_Cancel"), Gtk::RESPONSE_CANCEL);
dialog.add_button(_("Continue"), Gtk::RESPONSE_OK);
const int response = dialog.run();
test = (response == Gtk::RESPONSE_OK);
}
return test;
}
bool Frame_Glom::attempt_change_usermode_to_operator()
{
Document* document = dynamic_cast<Document*>(get_document());
if(!document)
return false;
document->set_userlevel(AppState::USERLEVEL_OPERATOR);
return true;
}
void Frame_Glom::on_menu_file_export()
......@@ -801,26 +786,20 @@ void Frame_Glom::on_menu_file_import()
}
}
void Frame_Glom::on_menu_file_toggle_share(const Glib::RefPtr<Gtk::ToggleAction>& action)
bool Frame_Glom::attempt_toggle_shared(bool shared)
{
if(!action)
{
std::cerr << G_STRFUNC << ": action was null." << std::endl;
}
//Prevent this change if not in developer mode,
//though the menu item should be disabled then anyway.
Document* document = dynamic_cast<Document*>(get_document());
if(!document || document->get_userlevel() != AppState::USERLEVEL_DEVELOPER)
return;
return false;
bool shared = action->get_active(); //Whether it should be shared.
if(shared == document->get_network_shared())
{
//Do nothing, because things are already as requested.
//This is probably just an extra signal emitted when we set the toggle in the UI.
//So we avoid the endless loop:
return;
return false;
}
bool change = true;
......@@ -1009,6 +988,8 @@ void Frame_Glom::on_menu_file_toggle_share(const Glib::RefPtr<Gtk::ToggleAction>
{
pApp->update_network_shared_ui();
}
return true;
}
#endif // !GLOM_ENABLE_CLIENT_ONLY
......
......@@ -26,7 +26,6 @@
#include "window_boxholder.h"
#include <gtkmm/frame.h>
#include <gtkmm/toggleaction.h>
#include <libglom/document/bakery/view/view_composite.h>
#include <libglom/document/document.h>
......@@ -76,15 +75,15 @@ public:
void on_box_reports_selected(const Glib::ustring& strName);
void on_box_print_layouts_selected(const Glib::ustring& strName);
void on_menu_developer_developer(const Glib::RefPtr<Gtk::RadioAction>& action, const Glib::RefPtr<Gtk::RadioAction>& operator_action);
void on_menu_developer_operator(const Glib::RefPtr<Gtk::RadioAction>& action);
bool attempt_change_usermode_to_developer();
bool attempt_change_usermode_to_operator();
void on_menu_file_export();
void on_menu_file_import();
void on_menu_file_print_edit_layouts();
#endif // !GLOM_ENABLE_CLIENT_ONLY
void on_menu_file_toggle_share(const Glib::RefPtr<Gtk::ToggleAction>& action);
bool attempt_toggle_shared(bool shared);
void on_menu_file_print();
void on_menu_Edit_Find();
......
......@@ -439,10 +439,12 @@ public:
#endif //SWIG
/** This is transitory information, not saved to disk.
* @result the active platform name - see get_data_layout_groups().
*/
Glib::ustring get_active_layout_platform() const;
/** This is transitory information, not saved to disk.
* @layout_platform the active platform name - see get_data_layout_groups().
*/
void set_active_layout_platform(const Glib::ustring& layout_platform = Glib::ustring());
......
......@@ -26,6 +26,7 @@
#include <libglom/db_utils.h>
#include <glom/frame_glom.h> //For show_ok_dialog()
#include <glom/glade_utils.h>
#include <giomm/menu.h>
#include <glibmm/i18n.h>
namespace Glom
......@@ -49,7 +50,7 @@ Box_Data_Calendar_Related::Box_Data_Calendar_Related()
m_calendar.signal_month_changed().connect( sigc::mem_fun(*this, &Box_Data_Calendar_Related::on_calendar_month_changed) );
setup_menu();
setup_menu(this);
//m_calendar.add_events(Gdk::BUTTON_PRESS_MASK); //Allow us to catch button_press_event and button_release_event
m_calendar.signal_button_press_event().connect_notify( sigc::mem_fun(*this, &Box_Data_Calendar_Related::on_calendar_button_press_event) );
......@@ -496,22 +497,17 @@ Glib::ustring Box_Data_Calendar_Related::on_calendar_details(guint year, guint m
return result;
}
void Box_Data_Calendar_Related::setup_menu()
void Box_Data_Calendar_Related::setup_menu(Gtk::Widget* /* this */)
{
m_refActionGroup = Gtk::ActionGroup::create();
m_refActionGroup = Gio::SimpleActionGroup::create();
m_refActionGroup->add(Gtk::Action::create("ContextMenu", "Context Menu") );
m_refContextEdit = Gtk::Action::create("ContextEdit", _("_Edit"));
m_refActionGroup->add(m_refContextEdit,
m_refContextEdit = m_refActionGroup->add_action("edit",
sigc::mem_fun(*this, &Box_Data_Calendar_Related::on_MenuPopup_activate_Edit) );
#ifndef GLOM_ENABLE_CLIENT_ONLY
// Don't add ContextLayout in client only mode because it would never
// be sensitive anyway
m_refContextLayout = Gtk::Action::create("ContextLayout", _("Layout"));
m_refActionGroup->add(m_refContextLayout,
m_refContextLayout = m_refActionGroup->add_action("layout",
sigc::mem_fun(*this, &Box_Data_Calendar_Related::on_MenuPopup_activate_layout) );
//TODO: This does not work until this widget is in a container in the window:
......@@ -523,40 +519,50 @@ void Box_Data_Calendar_Related::setup_menu()
}
#endif // !GLOM_ENABLE_CLIENT_ONLY
m_refUIManager = Gtk::UIManager::create();
Glib::RefPtr<Gtk::Builder> builder = Gtk::Builder::create();
m_refUIManager->insert_action_group(m_refActionGroup);
insert_action_group("context", m_refActionGroup);
//TODO: add_accel_group(m_refUIManager->get_accel_group());
const Glib::ustring ui_info =
"<interface>"
" <menu id='ContextMenu'>"
" <section>"
" <item>"
" <attribute name='label' translatable='yes'>_Edit</attribute>"
" <attribute name='action'>context.edit</attribute>"
" </item>"
" <item>"
" <attribute name='label' translatable='yes'>_Layout</attribute>"
" <attribute name='action'>context.layout</attribute>"
" </item>"
" </section>"
" </menu>"
"</interface>";
try
{
Glib::ustring ui_info =
"<ui>"
" <popup name='ContextMenu'>"
" <menuitem action='ContextEdit'/>"
#ifndef GLOM_ENABLE_CLIENT_ONLY
" <menuitem action='ContextLayout'/>"
#endif
" </popup>"
"</ui>";
m_refUIManager->add_ui_from_string(ui_info);
builder->add_from_string(ui_info);
}
catch(const Glib::Error& ex)
{
std::cerr << "building menus failed: " << ex.what();
std::cerr << G_STRFUNC << ": building menus failed: " << ex.what();
}
//Get the menu:
m_pMenuPopup = dynamic_cast<Gtk::Menu*>( m_refUIManager->get_widget("/ContextMenu") );
if(!m_pMenuPopup)
g_warning("menu not found");
Glib::RefPtr<Glib::Object> object =
builder->get_object("ContextMenu");
Glib::RefPtr<Gio::Menu> gmenu =
Glib::RefPtr<Gio::Menu>::cast_dynamic(object);
if(!gmenu)
g_warning("GMenu not found");
m_pMenuPopup = new Gtk::Menu(gmenu);
#ifndef GLOM_ENABLE_CLIENT_ONLY
if(pApp)
m_refContextLayout->set_sensitive(pApp->get_userlevel() == AppState::USERLEVEL_DEVELOPER);
m_refContextLayout->set_enabled(pApp->get_userlevel() == AppState::USERLEVEL_DEVELOPER);
#endif // !GLOM_ENABLE_CLIENT_ONLY
}
......
......@@ -27,6 +27,7 @@
#include <libglom/data_structure/layout/layoutitem_calendarportal.h>
#include <glom/utility_widgets/layoutwidgetbase.h>
#include <gtkmm/calendar.h>
#include <giomm/simpleactiongroup.h>
namespace Glom
{
......@@ -78,7 +79,7 @@ private:
Glib::ustring on_calendar_details(guint year, guint month, guint day);
void on_calendar_month_changed();
void setup_menu();
void setup_menu(Gtk::Widget* widget);
void on_calendar_button_press_event(GdkEventButton *event);
void on_MenuPopup_activate_Edit();
......@@ -96,12 +97,11 @@ private:
//TODO: Avoid repeating these in so many widgets:
Gtk::Menu* m_pMenuPopup;
Glib::RefPtr<Gtk::ActionGroup> m_refActionGroup;
Glib::RefPtr<Gtk::UIManager> m_refUIManager;
Glib::RefPtr<Gtk::Action> m_refContextEdit, m_refContextAdd, m_refContextDelete;
Glib::RefPtr<Gio::SimpleActionGroup> m_refActionGroup;
Glib::RefPtr<Gio::SimpleAction> m_refContextEdit, m_refContextAdd, m_refContextDelete;
#ifndef GLOM_ENABLE_CLIENT_ONLY
Glib::RefPtr<Gtk::Action> m_refContextLayout;
Glib::RefPtr<Gio::SimpleAction> m_refContextLayout;
#endif
//The cached data for the month:
......
......@@ -36,7 +36,7 @@ CheckButton::CheckButton(const Glib::ustring& title)
: Gtk::CheckButton(title)
{
#ifndef GLOM_ENABLE_CLIENT_ONLY
setup_menu();
setup_menu(this);
#endif // !GLOM_ENABLE_CLIENT_ONLY
init();
......@@ -48,7 +48,6 @@ CheckButton::~CheckButton()
void CheckButton::init()
{
}
#ifndef GLOM_ENABLE_CLIENT_ONLY
......
......@@ -48,7 +48,7 @@ ComboGlom::ComboGlom(bool has_entry)
m_ignore_changed(false)
{
#ifndef GLOM_ENABLE_CLIENT_ONLY
setup_menu();
setup_menu(this);
#endif // !GLOM_ENABLE_CLIENT_ONLY
//if(m_glom_type == Field::TYPE_NUMERIC)
......
......@@ -40,7 +40,7 @@ ComboAsRadioButtons::ComboAsRadioButtons()
ComboChoices()
{
#ifndef GLOM_ENABLE_CLIENT_ONLY
setup_menu();
setup_menu(this);
#endif // !GLOM_ENABLE_CLIENT_ONLY
init();
......
......@@ -246,7 +246,7 @@ DataWidget::DataWidget(const sharedptr<LayoutItem_Field>& field, const Glib::ust
}
#ifndef GLOM_ENABLE_CLIENT_ONLY
setup_menu();
setup_menu(this);
#endif // GLOM_ENABLE_CLIENT_ONLY
set_events(Gdk::BUTTON_PRESS_MASK);
......@@ -429,6 +429,7 @@ bool DataWidget::on_button_press_event(GdkEventButton *event)
AppWindow* pApp = get_appwindow();
if(pApp)
{
//TODO: Avoid doing this multiple times:
pApp->add_developer_action(m_refContextLayout); //So that it can be disabled when not in developer mode.
pApp->add_developer_action(m_refContextAddField);
pApp->add_developer_action(m_refContextAddRelatedRecords);
......
......@@ -42,20 +42,12 @@ Entry::Entry(BaseObjectType* cobject, const Glib::RefPtr<Gtk::Builder>& /* build
Gtk::Entry(cobject),
m_glom_type(Field::TYPE_TEXT)
{
#ifndef GLOM_ENABLE_CLIENT_ONLY
setup_menu();
#endif // !GLOM_ENABLE_CLIENT_ONLY
init();
}
Entry::Entry(Field::glom_field_type glom_type)
:
m_glom_type(glom_type)
: m_glom_type(glom_type)
{
#ifndef GLOM_ENABLE_CLIENT_ONLY
setup_menu();
#endif // !GLOM_ENABLE_CLIENT_ONLY
init();
}
......@@ -65,6 +57,9 @@ Entry::~Entry()
void Entry::init()
{
#ifndef GLOM_ENABLE_CLIENT_ONLY
setup_menu(this);
#endif // !GLOM_ENABLE_CLIENT_ONLY
}
void Entry::set_layout_item(const sharedptr<LayoutItem>& layout_item, const Glib::ustring& table_name)
......
......@@ -53,7 +53,7 @@ TextView::TextView(Field::glom_field_type glom_type)
void TextView::init()
{
#ifndef GLOM_ENABLE_CLIENT_ONLY
setup_menu();