~ubuntu-branches/ubuntu/hardy/uim/hardy

« back to all changes in this revision

Viewing changes to helper/toolbar-applet-gnome.c

  • Committer: Bazaar Package Importer
  • Author(s): Masahito Omote
  • Date: 2007-04-21 03:46:09 UTC
  • mfrom: (1.1.6 upstream)
  • Revision ID: james.westby@ubuntu.com-20070421034609-gpcurkutp8vaysqj
Tags: 1:1.4.1-3
* Switch to dh_gtkmodules for the gtk 2.10 transition (Closes:
  #419318)
  - debian/control: Add ${misc:Depends} and remove libgtk2.0-bin on
    uim-gtk2.0.
  - debian/uim-gtk2.0.post{inst,rm}: Removed.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/*
2
2
 
3
 
  Copyright (c) 2003-2006 uim Project http://uim.freedesktop.org/
 
3
  Copyright (c) 2003-2007 uim Project http://uim.freedesktop.org/
4
4
 
5
5
  All rights reserved.
6
6
 
46
46
 
47
47
static void exec_switcher(BonoboUIComponent *uic, gpointer data, const gchar *verbname);
48
48
static void exec_pref(BonoboUIComponent *uic, gpointer data, const gchar *verbname);
 
49
static void exec_dic(BonoboUIComponent *uic, gpointer data, const gchar *verbname);
 
50
static void exec_pad(BonoboUIComponent *uic, gpointer data, const gchar *verbname);
 
51
static void exec_hand(BonoboUIComponent *uic, gpointer data, const gchar *verbname);
 
52
static void exec_help(BonoboUIComponent *uic, gpointer data, const gchar *verbname);
49
53
static void display_about_dialog(BonoboUIComponent *uic, gpointer data, const gchar *verbname);
50
54
 
51
55
extern GtkWidget *uim_toolbar_applet_new(void);
54
58
static const BonoboUIVerb uim_menu_verbs[] = {
55
59
  BONOBO_UI_VERB("UimExecSwitcher", exec_switcher),
56
60
  BONOBO_UI_VERB("UimExecPref", exec_pref),
 
61
  BONOBO_UI_VERB("UimExecDic", exec_dic),
 
62
  BONOBO_UI_VERB("UimExecPad", exec_pad),
 
63
  BONOBO_UI_VERB("UimExecHand", exec_hand),
 
64
  BONOBO_UI_VERB("UimExecHelp", exec_help),
57
65
  BONOBO_UI_VERB("UimAbout", display_about_dialog),
58
66
  BONOBO_UI_VERB_END
59
67
};
62
70
static const char uim_menu_xml[] =
63
71
  "<popup name=\"button3\">\n"
64
72
  "   <menuitem name=\"Switcher Item\" verb=\"UimExecSwitcher\" _label=\"Switch input method\"\n"
65
 
  "             pixtype=\"filename\" pixname=\""UIM_PIXMAPSDIR"/switcher-icon.png\"/>\n"
 
73
  "             pixtype=\"filename\" pixname=\""UIM_PIXMAPSDIR"/im_switcher.png\"/>\n"
66
74
  "   <menuitem name=\"Pref Item\" verb=\"UimExecPref\" _label=\"Preference\"\n"
67
75
  "             pixtype=\"stock\" pixname=\"preferences\"/>\n"
 
76
  "   <menuitem name=\"Dic Item\" verb=\"UimExecDic\" _label=\"Japanese dictionary editor\"\n"
 
77
  "             pixtype=\"filename\" pixname=\""UIM_PIXMAPSDIR"/uim-dict.png\"/>\n"
 
78
  "   <menuitem name=\"Pad Item\" verb=\"UimExecPad\" _label=\"Input pad\"\n"
 
79
  "             pixtype=\"stock\" pixname=\"bold\"/>\n"
 
80
  "   <menuitem name=\"Hand Item\" verb=\"UimExecHand\" _label=\"Handwriting input pad\"\n"
 
81
  "             pixtype=\"stock\" pixname=\"edit\"/>\n"
 
82
  "   <menuitem name=\"Help Item\" verb=\"UimExecHelp\" _label=\"Help\"\n"
 
83
  "             pixtype=\"stock\" pixname=\"help\"/>\n"
68
84
  "   <menuitem name=\"About Item\" verb=\"UimAbout\" _label=\"About ...\"\n"
69
85
  "             pixtype=\"stock\" pixname=\"gnome-stock-about\"/>\n"
70
86
  "</popup>\n";
83
99
  system("uim-pref-gtk &");
84
100
}
85
101
 
 
102
static void
 
103
exec_dic(BonoboUIComponent *uic, gpointer data, const gchar *verbname)
 
104
{
 
105
  system("uim-dict-gtk &");
 
106
}
 
107
 
 
108
static void
 
109
exec_pad(BonoboUIComponent *uic, gpointer data, const gchar *verbname)
 
110
{
 
111
  system("uim-input-pad-ja &");
 
112
}
 
113
 
 
114
static void
 
115
exec_hand(BonoboUIComponent *uic, gpointer data, const gchar *verbname)
 
116
{
 
117
  system("uim-tomoe-gtk &");
 
118
}
 
119
 
 
120
static void
 
121
exec_help(BonoboUIComponent *uic, gpointer data, const gchar *verbname)
 
122
{
 
123
  system("uim-help &");
 
124
}
 
125
 
86
126
 
87
127
/* Opens gnome help application
88
128
 */
122
162
  icon = gdk_pixbuf_new_from_file(UIM_PIXMAPSDIR "/uim-icon.png", NULL);
123
163
 
124
164
  dialog = gnome_about_new(_("uim Applet"), VERSION,
125
 
                           "Copyright \xc2\xa9 2003-2006 uim Project.",
 
165
                           "Copyright \xc2\xa9 2003-2007 uim Project.",
126
166
                           _("Applet for indicating uim's status"),
127
167
                           authors,
128
168
                           NULL,