Hello community,

here is the log from the commit of package scim-sunpinyin for openSUSE:Factory 
checked in at 2012-10-31 14:05:08
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/scim-sunpinyin (Old)
 and      /work/SRC/openSUSE:Factory/.scim-sunpinyin.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "scim-sunpinyin", Maintainer is ""

Changes:
--------
--- /work/SRC/openSUSE:Factory/scim-sunpinyin/scim-sunpinyin.changes    
2012-09-17 17:00:13.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.scim-sunpinyin.new/scim-sunpinyin.changes       
2012-10-31 14:05:09.000000000 +0100
@@ -0,0 +1,6 @@
+-------------------------------------------------------------------
+Wed Oct 31 09:50:59 UTC 2012 - [email protected]
+
+- fix: scim-setup window won't appear. 
+  remove some deprecated functions, BuildRequire gtk3-devel
+

New:
----
  scim-sunpinyin-remove-old-functions.patch
  scim-sunpinyin-sconstruct-gtk3.patch

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ scim-sunpinyin.spec ++++++
--- /var/tmp/diff_new_pack.GBP0Fk/_old  2012-10-31 14:05:10.000000000 +0100
+++ /var/tmp/diff_new_pack.GBP0Fk/_new  2012-10-31 14:05:10.000000000 +0100
@@ -1,5 +1,5 @@
 #
-# spec file for  scim-sunpinyin
+# spec file for package scim-sunpinyin
 #
 # Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany.
 #
@@ -13,24 +13,42 @@
 # published by the Open Source Initiative.
 
 # Please submit bugfixes or comments via http://bugs.opensuse.org/
+#
 
 
 Name:           scim-sunpinyin
 Version:        2.0.3
-Release:        1
+Release:        0
 Summary:        Sunpinyin module for scim  
-Group:          System/I18n/Chinese 
 License:        LGPL-2.1 or CDDL-1.0
+Group:          System/I18n/Chinese 
 Url:            http://code.google.com/p/sunpinyin/
 %if 0%{?suse_version}
-BuildRequires:  scim-devel, sqlite3-devel, python >= 2.6, intltool, gcc-c++, 
scons, gtk2-devel
+BuildRequires:  gcc-c++
+BuildRequires:  gtk3-devel
+BuildRequires:  intltool
+BuildRequires:  python >= 2.6
+BuildRequires:  scim-devel
+BuildRequires:  scons
+BuildRequires:  sqlite3-devel
 %else
-BuildRequires:  scim-devel, sqlite-devel, python >= 2.6, intltool, gcc-c++, 
scons, gtk2-devel
+BuildRequires:  gcc-c++
+BuildRequires:  gtk3-devel
+BuildRequires:  intltool
+BuildRequires:  python >= 2.6
+BuildRequires:  scim-devel
+BuildRequires:  scons
+BuildRequires:  sqlite-devel
 %endif
-BuildRequires:  libsunpinyin-devel, libsunpinyin3     
+BuildRequires:  libsunpinyin-devel
+BuildRequires:  libsunpinyin3
 Source:         http://sunpinyin.googlecode.com/files/%{name}-%{version}.tar.gz
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
-AutoReqProv:    on
+
+#Add GTK_CHECK_VERSION to remove some deprecated functions [email protected]
+Patch1:         scim-sunpinyin-remove-old-functions.patch
+#BuildRequires gtk3-devel [email protected]
+Patch2:         scim-sunpinyin-sconstruct-gtk3.patch
 
 %description
 SunPinyin
@@ -60,6 +78,8 @@
 
 %prep
 %setup -q -n %{name}-%{version}
+%patch1 -p1
+%patch2 -p1
 
 %build
 scons --prefix=/usr --libdir=%{_libdir}
@@ -67,11 +87,9 @@
 %install
 scons install --prefix=/usr --libdir=%{_libdir} 
--install-sandbox=$RPM_BUILD_ROOT
 
-
 %clean
 rm -rf $RPM_BUILD_ROOT
 
-
 %files 
 %defattr(-,root,root)
 #%doc ChangeLog README COPYING

++++++ scim-sunpinyin-remove-old-functions.patch ++++++
diff --git a/src/sunpinyin_imengine_setup.cpp b/src/sunpinyin_imengine_setup.cpp
index 9c26e76..1f4dcaa 100644
--- a/src/sunpinyin_imengine_setup.cpp
+++ b/src/sunpinyin_imengine_setup.cpp
@@ -130,13 +130,20 @@ on_value_changed(GtkWidget *  widget,
 }
 
 static GtkWidget *
+#if GTK_CHECK_VERSION(2, 12, 0)
+create_options_page(GtkTooltip *tooltips)
+#else
 create_options_page(GtkTooltips *tooltips)
+#endif
 {
     GtkWidget *vbox;
     GtkWidget *label;
     GtkWidget *button;
-
+#if GTK_CHECK_VERSION(3, 0, 0)
+    vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
+#else
     vbox = gtk_vbox_new (FALSE, 12);
+#endif
     gtk_container_set_border_width(GTK_CONTAINER(vbox), 12);
 
     GtkWidget *table = gtk_table_new (2, 2, FALSE);
@@ -149,17 +156,35 @@ create_options_page(GtkTooltips *tooltips)
                       (GtkAttachOptions) (GTK_FILL), 4, 4);
 
 
+#if GTK_CHECK_VERSION(2, 24, 0)
+    GtkWidget *combo_box = gtk_combo_box_text_new();
+#else
     GtkWidget *combo_box = gtk_combo_box_new_text();
+#endif
     gtk_table_attach (GTK_TABLE (table), combo_box, 1, 2, 0, 1,
                       (GtkAttachOptions) (GTK_FILL),
                       (GtkAttachOptions) (GTK_FILL), 4, 4);
+#if GTK_CHECK_VERSION(2, 24, 0)
+    gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(combo_box), _("Classic 
Style"));
+    gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(combo_box), _("Instant 
Style"));
+#else
     gtk_combo_box_append_text(GTK_COMBO_BOX(combo_box), _("Classic Style"));
     gtk_combo_box_append_text(GTK_COMBO_BOX(combo_box), _("Instant Style"));
+#endif
+#if GTK_CHECK_VERSION(2, 12, 0)
+    gtk_widget_set_tooltip_text (combo_box, _("You may feel more comfortable 
in classic style, "
+                                                "if you are used to input 
methods like scim-pinyin."
+                                                " In instant style, the most 
possible candidate "
+                                                "word will show up in the 
preedit area right after "
+                                                "its pinyin is input."));
+
+#else
     gtk_tooltips_set_tip(tooltips, combo_box, _("You may feel more comfortable 
in classic style, "
                                                 "if you are used to input 
methods like scim-pinyin."
                                                 " In instant style, the most 
possible candidate "
                                                 "word will show up in the 
preedit area right after "
                                                 "its pinyin is input."), NULL);
+#endif
     g_signal_connect(G_OBJECT(combo_box), "changed",
                      G_CALLBACK(on_value_changed), NULL);
     input_style_combo = combo_box;
@@ -170,15 +195,31 @@ create_options_page(GtkTooltips *tooltips)
                       (GtkAttachOptions) (GTK_FILL),
                       (GtkAttachOptions) (GTK_FILL), 4, 4);
 
+#if GTK_CHECK_VERSION(2, 24, 0)
+    combo_box = gtk_combo_box_text_new();
+#else
     combo_box = gtk_combo_box_new_text();
+#endif
     gtk_table_attach (GTK_TABLE (table), combo_box, 1, 2, 1, 2,
                       (GtkAttachOptions) (GTK_FILL),
                       (GtkAttachOptions) (GTK_FILL), 4, 4);
+#if GTK_CHECK_VERSION(2, 24, 0)
+    gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(combo_box), _("GB2312"));
+    gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(combo_box), _("GBK"));
+#else
     gtk_combo_box_append_text(GTK_COMBO_BOX(combo_box), _("GB2312"));
     gtk_combo_box_append_text(GTK_COMBO_BOX(combo_box), _("GBK"));
+#endif
+#if GTK_CHECK_VERSION(2, 12, 0)
+    gtk_widget_set_tooltip_text (combo_box, _("Choosing GBK over GB2312 will 
trade some speed "
+                                               "with a larger charset in which 
I search candidate "
+                                               "words/characters for you."));
+
+#else
     gtk_tooltips_set_tip(tooltips, combo_box, _("Choosing GBK over GB2312 will 
trade some speed "
                                                 "with a larger charset in 
which I search candidate "
                                                 "words/characters for you."), 
NULL);
+#endif
     g_signal_connect(G_OBJECT(combo_box), "changed",
                      G_CALLBACK(on_value_changed), NULL);
     charset_combo = combo_box;
@@ -203,7 +244,11 @@ create_options_page(GtkTooltips *tooltips)
 
     // MemoryPower
     GtkWidget *hbox;
+#if GTK_CHECK_VERSION(3, 0, 0)
+    hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
+#else
     hbox = gtk_hbox_new (FALSE, 0);
+#endif
     gtk_widget_show (hbox);
     gtk_box_pack_start (GTK_BOX(vbox), hbox, FALSE, FALSE, 0);
 
@@ -215,8 +260,13 @@ create_options_page(GtkTooltips *tooltips)
     gtk_misc_set_padding (GTK_MISC (label), 2, 0);
 
     button = gtk_spin_button_new_with_range (0, 10, 1);
+#if GTK_CHECK_VERSION(2, 12, 0)
+    gtk_widget_set_tooltip_text (button, _("The larger this number is, the 
faster I "
+                                             "memorize/forget new words."));
+#else
     gtk_tooltips_set_tip(tooltips, button, _("The larger this number is, the 
faster I "
                                              "memorize/forget new words."), 
NULL);
+#endif
     g_signal_connect (G_OBJECT(button), "value_changed",
                       G_CALLBACK(on_value_changed), NULL);
     gtk_widget_show (button);
@@ -236,10 +286,17 @@ create_setup_window ()
     GtkWidget *notebook;
     GtkWidget *label;
     GtkWidget *page;
+#if GTK_CHECK_VERSION(2, 12, 0)
+    GtkTooltip *tooltips;
+#else
     GtkTooltips *tooltips;
+#endif
 
     // Create the shared tooltips.
+#if GTK_CHECK_VERSION(2, 12, 0)
+#else
     tooltips = gtk_tooltips_new ();
+#endif
 
     notebook = gtk_notebook_new ();
 
++++++ scim-sunpinyin-sconstruct-gtk3.patch ++++++
diff --git a/SConstruct b/SConstruct
index 7739300..3d23028 100644
--- a/SConstruct
+++ b/SConstruct
@@ -94,6 +94,9 @@ conf = Configure(env, custom_tests={'CheckPKGConfig' : 
CheckPKGConfig,
                                     'CheckPKG' : CheckPKG })
 
 def DoConfigure():
+
+    gtk_version = 0
+
     if GetOption('clean'):
         return
 
@@ -106,11 +109,22 @@ def DoConfigure():
     if not conf.CheckPKG('sunpinyin-2.0'):
         Exit(1)
 
-    if not conf.CheckPKG('gtk+-2.0'):
-        Exit(1)
+    if conf.CheckPKG('gtk+-2.0'):
+        gtk_version=2
     
+    if conf.CheckPKG('gtk+-3.0'):
+        gtk_version=3
+
+    if not gtk_version:
+        Exit(1)
+
     env = conf.Finish()
-    env.ParseConfig('pkg-config scim sunpinyin-2.0 gtk+-2.0 --libs --cflags')
+    if (gtk_version == 2):
+        env.ParseConfig('pkg-config scim sunpinyin-2.0 gtk+-2.0 --libs 
--cflags')
+    elif (gtk_version == 3):
+        env.ParseConfig('pkg-config scim sunpinyin-2.0 gtk+-3.0 --libs 
--cflags')
+    else:
+        Exit(1)
 
 DoConfigure()
 
-- 
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to