Use libetpan CFLAGS for header check
[claws.git] / src / plugins / python / examples / main / Print-action-names
1 # -*- coding: utf-8 -*-
2
3 import gi
4 gi.require_version("Gtk", "3.0")
5 from gi.repository import Gtk
6
7 action_group = clawsmail.get_mainwindow_action_group()
8 actions = []
9 for action in action_group.list_actions():
10     actions.append(action.get_name())
11 actions.sort()
12
13 win = Gtk.Window(title="List of actions")
14 win.connect("destroy", Gtk.main_quit)
15 win.set_position(Gtk.WindowPosition.CENTER)
16 swin = Gtk.ScrolledWindow(None, None)
17 swin.set_min_content_height(400)
18 swin.set_min_content_width(600)
19 buf = Gtk.TextBuffer()
20 buf.set_text('\n'.join(actions))
21 view = Gtk.TextView.new_with_buffer(buf)
22 swin.add(view)
23 win.add(swin)
24 win.show_all()
25 win.present()
26 Gtk.main()