diff options
author | fujiwarat <takao.fujiwara1@gmail.com> | 2010-10-15 18:08:39 +0900 |
---|---|---|
committer | fujiwarat <takao.fujiwara1@gmail.com> | 2010-10-15 18:08:39 +0900 |
commit | 4899169b33e41542d5ed59ef9355178e2f14db6e (patch) | |
tree | 4239ae1f636dc56d1065f6415cb1e7e2fead3194 | |
parent | 35de39bf7fb43d429672b30996adaf65e6a7de4a (diff) | |
download | ibus-anthy-4899169b33e41542d5ed59ef9355178e2f14db6e.tar.gz |
Added version info.
-rw-r--r-- | setup/Makefile.am | 1 | ||||
-rw-r--r-- | setup/anthyprefs.py.in | 3 | ||||
-rw-r--r-- | setup/main.py | 19 | ||||
-rw-r--r-- | setup/setup.glade | 29 |
4 files changed, 41 insertions, 11 deletions
diff --git a/setup/Makefile.am b/setup/Makefile.am index 761e397..95fb75a 100644 --- a/setup/Makefile.am +++ b/setup/Makefile.am @@ -58,6 +58,7 @@ anthyprefs.py: anthyprefs.py.in sed -e "s|\@ANTHY_ZIPCODE_FILE\@|$(ANTHY_ZIPCODE_FILE)|g" \ -e "s|\@KASUMI_EXEC_FILE\@|$(KASUMI_EXEC_FILE)|g" \ -e "s|\@KASUMI_ICON_FILE\@|$(KASUMI_ICON_FILE)|g" \ + -e "s|\@VERSION\@|$(VERSION)|g" \ -e "s|\@pkgdatadir\@|$(pkgdatadir)|g" \ $< > $@ diff --git a/setup/anthyprefs.py.in b/setup/anthyprefs.py.in index 1c825d7..d05c41a 100644 --- a/setup/anthyprefs.py.in +++ b/setup/anthyprefs.py.in @@ -78,6 +78,9 @@ class AnthyPrefs(Prefs): def get_japanese_ordered_list(self): return _japanese_ordered_list + def get_version(self): + return '@VERSION@' + # Sad! dict.keys() doesn't return the saved order. # locale.strcoll() also just returns the Unicode code point. # Unicode order is wrong in Japanese large 'a' and small 'a'. diff --git a/setup/main.py b/setup/main.py index e8b3a8f..1a059ad 100644 --- a/setup/main.py +++ b/setup/main.py @@ -167,6 +167,7 @@ class AnthySetup(object): self.__append_dicts_in_model() self.__init_japanese_sort() + self.__init_about_vbox(icon_path) xml.signal_autoconnect(self) @@ -177,6 +178,24 @@ class AnthySetup(object): japanese_ordered_dict[c] = index self.__japanese_ordered_dict = japanese_ordered_dict; + def __init_about_vbox(self, icon_path): + about_dialog = self.xml.get_widget("about_dialog") + about_vbox = self.xml.get_widget("about_vbox") + + about_dialog.set_version(self.prefs.get_version()) + if icon_path != None: + image = gtk.image_new_from_file(icon_path) + about_dialog.set_logo(image.get_pixbuf()) + content_area = about_dialog.get_content_area() + list = content_area.get_children() + vbox = list[0] + for w in vbox.get_children(): + old_parent = w.parent + w.unparent() + w.set_parent_window(None) + w.emit("parent-set", old_parent) + about_vbox.pack_start(w, False, False, 0) + def __get_userhome(self): if 'HOME' not in environ: import pwd diff --git a/setup/setup.glade b/setup/setup.glade index a09d606..a304fb7 100644 --- a/setup/setup.glade +++ b/setup/setup.glade @@ -1573,18 +1573,11 @@ FMV KB611 key extension</property> </packing> </child> <child> - <widget class="GtkLabel" id="about"> + <widget class="GtkVBox" id="about_vbox"> <property name="visible">True</property> - <property name="label" translatable="yes"><span size='xx-large'><b>IBus-Anthy</b></span> - -<big>The Anthy engine for IBus input platform</big> - -URL : http://code.google.com/p/ibus/ - -</property> - <property name="use_markup">True</property> - <property name="justify">center</property> - <property name="ellipsize">start</property> + <property name="orientation">vertical</property> + <property name="border_width">10</property> + <property name="spacing">6</property> </widget> <packing> <property name="position">5</property> @@ -2423,4 +2416,18 @@ URL : http://code.google.com/p/ibus/ </packing> </child> </widget> + <widget class="GtkAboutDialog" id="about_dialog"> + <property name="program-name">IBus-Anthy</property> + <property name="copyright">Copyright (c) 2007-2008 Peng Huang +Copyright (c) 2009 Hideaki ABE +Copyright (c) 2009-2010 Takao Fujiwara +Copyright (c) 2007-2010 Red Hat, Inc.</property> + <property name="comments" translatable="yes">The Anthy engine for IBus input platform</property> + <property name="license">GPL</property> + <property name="website">http://code.google.com/p/ibus/</property> + <property name="authors">Takao Fujiwara <takao.fujiwara1@gmail.com></property> + <property name="translator-credits" translatable="yes">translator_credits</property> + <property name="logo-icon-name"></property> + <property name="wrap-license">True</property> + </widget> </glade-interface> |