Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
GNOME
glom
Commits
538eb829
Commit
538eb829
authored
Sep 24, 2013
by
Murray Cumming
Browse files
gmenu: Add attach_to_widget() calls for context menus.
This makes them actually work.
parent
fa0c6597
Changes
11
Hide whitespace changes
Inline
Side-by-side
glom/mode_data/box_data_calendar_related.cc
View file @
538eb829
...
...
@@ -528,6 +528,7 @@ void Box_Data_Calendar_Related::setup_menu(Gtk::Widget* /* this */)
menu
->
append
(
_
(
"_Layout"
),
"context.layout"
);
m_pMenuPopup
=
new
Gtk
::
Menu
(
menu
);
m_pMenuPopup
->
attach_to_widget
(
*
this
);
#ifndef GLOM_ENABLE_CLIENT_ONLY
if
(
pApp
)
...
...
glom/mode_data/db_adddel/db_adddel.cc
View file @
538eb829
...
...
@@ -265,7 +265,7 @@ void DbAddDel::setup_menu(Gtk::Widget* /* widget */)
#endif
m_pMenuPopup
=
new
Gtk
::
Menu
(
menu
);
m_pMenuPopup
->
attach_to_widget
(
*
this
);
if
(
get_allow_user_actions
())
{
...
...
glom/mode_design/print_layouts/window_print_layout_edit.cc
View file @
538eb829
...
...
@@ -877,6 +877,7 @@ void Window_PrintLayout_Edit::setup_context_menu()
g_warning
(
"GMenu not found"
);
m_context_menu
=
new
Gtk
::
Menu
(
gmenu
);
m_context_menu
->
attach_to_widget
(
*
this
);
}
bool
Window_PrintLayout_Edit
::
on_canvas_motion_notify_event
(
GdkEventMotion
*
event
)
...
...
glom/mode_design/relationships_overview/dialog_relationships_overview.cc
View file @
538eb829
...
...
@@ -451,14 +451,8 @@ void Dialog_RelationshipsOverview::on_table_show_context(guint button, guint32 a
sigc
::
bind
(
sigc
::
mem_fun
(
*
this
,
&
Dialog_RelationshipsOverview
::
on_context_menu_edit_relationships
),
table
));
}
if
(
!
m_context_menu
->
get_attach_widget
())
{
m_context_menu
->
attach_to_widget
(
*
this
);
}
if
(
m_context_menu
)
m_context_menu
->
popup
(
button
,
activate_time
);
}
void
Dialog_RelationshipsOverview
::
setup_context_menu
()
...
...
@@ -479,6 +473,7 @@ void Dialog_RelationshipsOverview::setup_context_menu()
g_warning
(
"GMenu not found"
);
m_context_menu
=
new
Gtk
::
Menu
(
gmenu
);
m_context_menu
->
attach_to_widget
(
*
this
);
}
void
Dialog_RelationshipsOverview
::
on_context_menu_edit_fields
(
const
Glib
::
VariantBase
&
/* parameter */
,
Glib
::
RefPtr
<
CanvasGroupDbTable
>
table
)
...
...
glom/print_layout/canvas_print_layout.cc
View file @
538eb829
...
...
@@ -293,6 +293,7 @@ void Canvas_PrintLayout::setup_context_menu()
menu
->
append
(
_
(
"_Formatting"
),
"context.formatting"
);
menu
->
append
(
_
(
"_Delete"
),
"context.delete"
);
m_context_menu
=
new
Gtk
::
Menu
(
menu
);
m_context_menu
->
attach_to_widget
(
*
this
);
}
...
...
glom/utility_widgets/adddel/adddel.cc
View file @
538eb829
...
...
@@ -251,6 +251,7 @@ void AddDel::setup_menu(Gtk::Widget* /* widget */)
menu
->
append
(
_
(
"_Delete"
),
"context.delete"
);
m_pMenuPopup
=
new
Gtk
::
Menu
(
menu
);
m_pMenuPopup
->
attach_to_widget
(
*
this
);
}
bool
AddDel
::
on_button_press_event_Popup
(
GdkEventButton
*
event
)
...
...
glom/utility_widgets/canvas/test_canvas_editable.cc
View file @
538eb829
...
...
@@ -185,6 +185,7 @@ private:
//Get the menu:
m_context_menu
=
new
Gtk
::
Menu
(
menu
);
m_context_menu
->
attach_to_widget
(
*
this
);
}
Gtk
::
Menu
*
m_context_menu
;
...
...
glom/utility_widgets/imageglom.cc
View file @
538eb829
...
...
@@ -961,6 +961,7 @@ void ImageGlom::setup_menu_usermode()
menu
->
append
(
_
(
"_Clear"
),
"context.clear"
);
m_pMenuPopup_UserMode
=
new
Gtk
::
Menu
(
menu
);
m_pMenuPopup_UserMode
->
attach_to_widget
(
*
this
);
}
void
ImageGlom
::
do_choose_image
()
...
...
@@ -981,11 +982,6 @@ void ImageGlom::popup_menu(guint button, guint32 activate_time)
return
;
}
if
(
!
m_pMenuPopup_UserMode
->
get_attach_widget
())
{
m_pMenuPopup_UserMode
->
attach_to_widget
(
*
this
);
}
m_pMenuPopup_UserMode
->
popup
(
button
,
activate_time
);
m_refActionSelectFile
->
set_enabled
();
...
...
glom/utility_widgets/layoutwidgetmenu.cc
View file @
538eb829
...
...
@@ -127,6 +127,7 @@ void LayoutWidgetMenu::setup_menu(Gtk::Widget* widget)
m_pMenuPopup
=
new
Gtk
::
Menu
(
menu
);
m_pMenuPopup
->
attach_to_widget
(
*
widget
);
if
(
pApp
)
m_refContextLayout
->
set_enabled
(
pApp
->
get_userlevel
()
==
AppState
::
USERLEVEL_DEVELOPER
);
...
...
glom/utility_widgets/layoutwidgetutils.cc
View file @
538eb829
...
...
@@ -59,6 +59,7 @@ void LayoutWidgetUtils::setup_util_menu(Gtk::Widget* widget)
menu
->
append
(
_
(
"_Delete"
),
"context.delete"
);
m_pPopupMenuUtils
=
new
Gtk
::
Menu
(
menu
);
m_pPopupMenuUtils
->
attach_to_widget
(
*
widget
);
#endif
}
...
...
glom/utility_widgets/notebooklabelglom.cc
View file @
538eb829
...
...
@@ -125,6 +125,7 @@ void NotebookLabel::setup_menu(Gtk::Widget* /* widget */)
menu
->
append
(
_
(
"_Delete"
),
"context.delete"
);
m_pPopupMenu
=
new
Gtk
::
Menu
(
menu
);
m_pPopupMenu
->
attach_to_widget
(
*
this
);
}
bool
NotebookLabel
::
on_button_press_event
(
GdkEventButton
*
event
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment