f6e659e...
by
Peter Bloomfield <email address hidden>
on 2020-09-13
Various: Use stateless GActions with targets
Use stateless GActions with targets instead of setting GObject data on
random objects.
If the GAction is given a non-NULL parameter type but no state and no
"change state" callback, it is rendered as stateless, and the target can
be retrieved from the GVariant parameter of the "activated" callback. The
target cannot be an arbitrary pointer, and is in fact a string in all
these cases:
* libbalsa/ libbalsa- vfs.c (libbalsa_ vfs_launch_ app),
(libbalsa_ vfs_launch_ app_for_ body), (gio_add_ vfs_menu_ item),
(libbalsa_ vfs_fill_ menu_by_ content_ type),
(libbalsa_ vfs_mime_ button) :
* libbalsa/ libbalsa- vfs.h:
* src/balsa-index.c (move_to_ activated) , (bndx_add_actions),
(bndx_do_popup):
* src/balsa-mblist.c (balsa_ mblist_ mru_menu) ,
(balsa_ mblist_ mru_get_ url_from_ variant) ,
(balsa_ mblist_ mru_get_ mailbox_ from_variant) :
* src/balsa-mblist.h:
* src/balsa-message.c (open_with_ activated) , (copy_part_ activated) ,
(part_ add_actions) , (part_create_menu):
* src/balsa- mime-widget- callbacks. c
(balsa_ mime_widget_ ctx_menu_ launch_ app),
(balsa_ mime_widget_ ctx_menu_ cb):
* src/balsa- mime-widget- callbacks. h:
* src/balsa- mime-widget- message. c (copy_activated),
(bm_header_ extend_ popup):
* src/balsa- mime-widget- text.c (open_with_ activated) ,
(text_ view_populate_ popup), (bmwt_html_ open_with_ activated) ,
(bmwt_ html_populate_ popup_menu) , (bmwt_html_ button_ press_cb) :
* src/message- window. c (move_to_ activated) , (message_ window_ new):
* src/sendmsg- window. c (launch_ app_activated) , (open_attachment),
(add_attachment), (add_urlref_ attachment) :
mblist: Add guards for NULL GVariant
971f4ca...
by
Peter Bloomfield <email address hidden>
on 2020-07-12
balsa-index: Fix a typo
3b1a732...
by
Peter Bloomfield <email address hidden>
on 2020-07-12
Various: Drop libbalsa_ {radio, toggle} _activated
Drop some more uses of libbalsa_ {radio, toggle} _activated.
src/balsa-message.c
src/sendmsg- window. c
src/toolbar- factory. c
4b55368...
by
Peter Bloomfield <email address hidden>
on 2020-07-02
balsa-mblist: Add guards
0efa7ab...
by
Peter Bloomfield <email address hidden>
on 2020-06-28
Minor cleanup
libbalsa-vfs: Add guards
balsa-mblist.c: Correct description
3a4da49...
by
Peter Bloomfield <email address hidden>
on 2020-06-28
Various: Improve the MRU menu helpers
Users of the menu don't need to know how the action's state is obtained
from the action and the user-data.
66f5e95...
by
Peter Bloomfield <email address hidden>
on 2020-06-27
Various: Fill some menus with stateless GMenuItems
Fill the move-to/copy-to menus with stateless GMenuItems, so that they
are rendered without radio buttons.
Instead, pass the URL as GObject data on a convenient object.
* src/balsa-mblist.c (bmbl_add_action), (balsa_ mblist_ mru_menu) ,
(balsa_ mblist_ mru_get_ url), (balsa_ mblist_ mru_get_ mailbox_ from_url) :
rework balsa_mblist_ mru_menu( );
* src/balsa-mblist.h: revised APIs;
* src/balsa-index.c (move_to_ activated) , (bndx_add_actions),
(bndx_ popup_menu_ create) , (bndx_do_popup): use them;
* src/balsa-message.c (copy_part_ activated) , (part_add_actions),
(part_ create_ menu): ditto;
* src/balsa- mime-widget- message. c (copy_activated),
(bm_header_ extend_ popup): ditto;
* src/message- window. c (move_to_ activated) , (message_ window_ new): ditto;
* src/sendmsg- window. c (add_urlref_ attachment) : ditto.
a9b8c86...
by
Peter Bloomfield <email address hidden>
on 2020-06-26
Various: Fill some menus with stateless GMenuItems
Fill the open-with menus with stateless GMenuItems, so that they are
rendered without radio buttons.
Instead of passing the app's name as the state of a stateful GMenuItem,
pass the GAppInfo itself as GObject data on a convenient object.
* libbalsa/ libbalsa- vfs.c (libbalsa_ vfs_launch_ app),
(libbalsa_ vfs_launch_ app_for_ body), (gio_add_ vfs_menu_ item),
(libbalsa_ vfs_fill_ menu_by_ content_ type),
(libbalsa_ vfs_mime_ button) :
* libbalsa/ libbalsa- vfs.h:
* src/balsa-message.c (open_with_ activated) , (part_add_actions),
(part_ create_ menu):
* src/balsa- mime-widget- callbacks. c
(balsa_ mime_widget_ ctx_menu_ launch_ app),
(balsa_ mime_widget_ ctx_menu_ cb):
* src/balsa- mime-widget- callbacks. h:
* src/balsa- mime-widget- text.c (open_with_ activated) ,
(text_ view_populate_ popup), (bmwt_html_ open_with_ activated) ,
(bmwt_ html_populate_ popup_menu) , (bmwt_html_ button_ press_cb) :
* src/sendmsg- window. c (attachment_ menu_vfs_ cb), (add_attachment):
6ebaa8b...
by
Peter Bloomfield <email address hidden>
on 2020-06-24
mime-widget-text: Actually pop up a context menu
Actually pop up the context menu when right-clicking on an URL.
* src/balsa- mime-widget- text.c (text_view_ url_popup) :
f33344c...
by
Peter Bloomfield <email address hidden>
on 2020-06-24
balsa-message: Add action-entries in a helper