~ubuntu-branches/ubuntu/wily/apvlv/wily

« back to all changes in this revision

Viewing changes to src/ApvlvMenu.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Michael Biebl
  • Date: 2011-06-01 22:18:49 UTC
  • mfrom: (10.1.4 sid)
  • Revision ID: james.westby@ubuntu.com-20110601221849-niibd5p5i7avemy4
Tags: 0.1.1-1.1
* Non-maintainer upload.
* Add support for poppler >= 0.15. Patch by Pino Toscano. (Closes: #627609)

Show diffs side-by-side

added added

removed removed

Lines of Context:
29
29
#include "ApvlvMenu.hpp"
30
30
 
31
31
namespace apvlv
32
 
{
 
32
  {
33
33
  static void apvlv_menu_on_file_open ();
34
34
  static void apvlv_menu_on_file_opentab ();
35
35
  static void apvlv_menu_on_file_saveas ();
43
43
  static void apvlv_menu_on_tools_jumpback ();
44
44
  static void apvlv_menu_on_help_about ();
45
45
 
46
 
    ApvlvMenu::ApvlvMenu ()
 
46
  ApvlvMenu::ApvlvMenu ()
47
47
  {
48
 
    const GtkActionEntry action_entries[] = {
 
48
    const GtkActionEntry action_entries[] =
 
49
    {
49
50
      {"File", NULL, "File", NULL, NULL, NULL},
50
51
      {"Open", NULL, "Open", NULL, NULL, apvlv_menu_on_file_open},
51
52
      {"OpenTab", ":tabnew", "Open Tab...", NULL, NULL,
102
103
 
103
104
    GtkActionGroup *group = gtk_action_group_new ("action");
104
105
    gtk_action_group_add_actions (group, action_entries, sizeof
105
 
                                  (action_entries) / sizeof
106
 
                                  (action_entries[0]), NULL);
 
106
                                  (action_entries) / sizeof
 
107
                                  (action_entries[0]), NULL);
107
108
    gtk_ui_manager_insert_action_group (manager, group, 0);
108
109
 
109
110
    gtk_ui_manager_add_ui_from_string (manager, menu_string, -1, NULL);
122
123
 
123
124
  void ApvlvMenu::setsize (gint w, gint h)
124
125
  {
 
126
    gtk_widget_set_size_request (mMenu, w, h);
125
127
  }
126
128
 
127
129
  static void apvlv_menu_on_file_open ()
182
184
  static void apvlv_menu_on_help_about ()
183
185
  {
184
186
    GtkWidget *dia = NULL;
185
 
    static const char *author[] = {
 
187
    static const char *author[] =
 
188
    {
186
189
      "Alf",
187
190
      NULL
188
191
    };
193
196
    gtk_about_dialog_set_authors (GTK_ABOUT_DIALOG (dia), author);
194
197
    gtk_about_dialog_set_artists (GTK_ABOUT_DIALOG (dia), author);
195
198
    gtk_about_dialog_set_website (GTK_ABOUT_DIALOG (dia),
196
 
                                  "http://naihe2010.cublog.cn");
 
199
                                  "http://naihe2010.cublog.cn");
197
200
    gtk_about_dialog_set_copyright (GTK_ABOUT_DIALOG (dia), "GNU");
198
201
    gtk_dialog_run (GTK_DIALOG (dia));
199
202
    gtk_widget_destroy (dia);