Update translation.
authorHong Jen Yee (PCMan) <pcman.tw@gmail.com>
Thu, 27 Mar 2008 16:00:39 +0000 (16:00 +0000)
committerHong Jen Yee (PCMan) <pcman.tw@gmail.com>
Thu, 27 Mar 2008 16:00:39 +0000 (16:00 +0000)
Some fixes for lxappearance.

demo.glade
lxappearance.glade
po/POTFILES.in
po/zh_TW.po
src/demo-ui.c
src/main-dlg.c
src/main.c

index 2a28879..5d7c34a 100644 (file)
                      <property name="digits">1</property>
                      <property name="update_policy">GTK_UPDATE_CONTINUOUS</property>
                      <property name="inverted">False</property>
                      <property name="digits">1</property>
                      <property name="update_policy">GTK_UPDATE_CONTINUOUS</property>
                      <property name="inverted">False</property>
-                     <property name="adjustment">0 0 0 0 0</property>
+                     <property name="adjustment">0 0 100 10 0 0</property>
                    </widget>
                    <packing>
                      <property name="padding">0</property>
                    </widget>
                    <packing>
                      <property name="padding">0</property>
                        <widget class="GtkButton" id="button1">
                          <property name="visible">True</property>
                          <property name="can_focus">True</property>
                        <widget class="GtkButton" id="button1">
                          <property name="visible">True</property>
                          <property name="can_focus">True</property>
-                         <property name="label" translatable="yes">button1</property>
-                         <property name="use_underline">True</property>
                          <property name="relief">GTK_RELIEF_NORMAL</property>
                          <property name="focus_on_click">True</property>
                          <property name="relief">GTK_RELIEF_NORMAL</property>
                          <property name="focus_on_click">True</property>
+
+                         <child>
+                           <widget class="GtkAlignment" id="alignment3">
+                             <property name="visible">True</property>
+                             <property name="xalign">0.5</property>
+                             <property name="yalign">0.5</property>
+                             <property name="xscale">0</property>
+                             <property name="yscale">0</property>
+                             <property name="top_padding">0</property>
+                             <property name="bottom_padding">0</property>
+                             <property name="left_padding">0</property>
+                             <property name="right_padding">0</property>
+
+                             <child>
+                               <widget class="GtkHBox" id="hbox4">
+                                 <property name="visible">True</property>
+                                 <property name="homogeneous">False</property>
+                                 <property name="spacing">2</property>
+
+                                 <child>
+                                   <widget class="GtkImage" id="image1">
+                                     <property name="visible">True</property>
+                                     <property name="stock">gtk-find</property>
+                                     <property name="icon_size">4</property>
+                                     <property name="xalign">0.5</property>
+                                     <property name="yalign">0.5</property>
+                                     <property name="xpad">0</property>
+                                     <property name="ypad">0</property>
+                                   </widget>
+                                   <packing>
+                                     <property name="padding">0</property>
+                                     <property name="expand">False</property>
+                                     <property name="fill">False</property>
+                                   </packing>
+                                 </child>
+
+                                 <child>
+                                   <widget class="GtkLabel" id="label18">
+                                     <property name="visible">True</property>
+                                     <property name="label" translatable="yes">button</property>
+                                     <property name="use_underline">True</property>
+                                     <property name="use_markup">False</property>
+                                     <property name="justify">GTK_JUSTIFY_LEFT</property>
+                                     <property name="wrap">False</property>
+                                     <property name="selectable">False</property>
+                                     <property name="xalign">0.5</property>
+                                     <property name="yalign">0.5</property>
+                                     <property name="xpad">0</property>
+                                     <property name="ypad">0</property>
+                                     <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+                                     <property name="width_chars">-1</property>
+                                     <property name="single_line_mode">False</property>
+                                     <property name="angle">0</property>
+                                   </widget>
+                                   <packing>
+                                     <property name="padding">0</property>
+                                     <property name="expand">False</property>
+                                     <property name="fill">False</property>
+                                   </packing>
+                                 </child>
+                               </widget>
+                             </child>
+                           </widget>
+                         </child>
                        </widget>
                        <packing>
                          <property name="padding">0</property>
                        </widget>
                        <packing>
                          <property name="padding">0</property>
@@ -648,7 +710,7 @@ Test Item 3</property>
            <widget class="GtkScrolledWindow" id="scrolledwindow6">
              <property name="visible">True</property>
              <property name="can_focus">True</property>
            <widget class="GtkScrolledWindow" id="scrolledwindow6">
              <property name="visible">True</property>
              <property name="can_focus">True</property>
-             <property name="hscrollbar_policy">GTK_POLICY_ALWAYS</property>
+             <property name="hscrollbar_policy">GTK_POLICY_NEVER</property>
              <property name="vscrollbar_policy">GTK_POLICY_ALWAYS</property>
              <property name="shadow_type">GTK_SHADOW_IN</property>
              <property name="window_placement">GTK_CORNER_TOP_LEFT</property>
              <property name="vscrollbar_policy">GTK_POLICY_ALWAYS</property>
              <property name="shadow_type">GTK_SHADOW_IN</property>
              <property name="window_placement">GTK_CORNER_TOP_LEFT</property>
index f36f6b5..08473c0 100644 (file)
@@ -4,7 +4,6 @@
 <glade-interface>
 
 <widget class="GtkDialog" id="dlg">
 <glade-interface>
 
 <widget class="GtkDialog" id="dlg">
-  <property name="visible">True</property>
   <property name="title" translatable="yes">Appearance Settings</property>
   <property name="type">GTK_WINDOW_TOPLEVEL</property>
   <property name="window_position">GTK_WIN_POS_NONE</property>
   <property name="title" translatable="yes">Appearance Settings</property>
   <property name="type">GTK_WINDOW_TOPLEVEL</property>
   <property name="window_position">GTK_WIN_POS_NONE</property>
index 658fa3f..74e9572 100644 (file)
@@ -3,3 +3,5 @@
 src/main.c
 src/main-dlg-ui.c
 src/main-dlg.c
 src/main.c
 src/main-dlg-ui.c
 src/main-dlg.c
+src/demo.c
+src/demo-ui.c
index bfe23a7..7a81a28 100644 (file)
@@ -7,8 +7,8 @@ msgid ""
 msgstr ""
 "Project-Id-Version: 0.1\n"
 "Report-Msgid-Bugs-To: \n"
 msgstr ""
 "Project-Id-Version: 0.1\n"
 "Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2008-03-23 10:50+0800\n"
-"PO-Revision-Date: 2008-03-23 12:22+0800\n"
+"POT-Creation-Date: 2008-03-27 23:59+0800\n"
+"PO-Revision-Date: 2008-03-28 00:00+0800\n"
 "Last-Translator: 洪任諭 <pcman.tw@gmail.com>\n"
 "Language-Team: zh_TW <LL@li.org>\n"
 "MIME-Version: 1.0\n"
 "Last-Translator: 洪任諭 <pcman.tw@gmail.com>\n"
 "Language-Team: zh_TW <LL@li.org>\n"
 "MIME-Version: 1.0\n"
@@ -18,118 +18,111 @@ msgstr ""
 "X-Poedit-Country: TAIWAN\n"
 "X-Poedit-SourceCharset: iso-8859-1\n"
 
 "X-Poedit-Country: TAIWAN\n"
 "X-Poedit-SourceCharset: iso-8859-1\n"
 
-#: src/main-dlg-ui.c:124
+#: src/main-dlg-ui.c:60
 msgid "Appearance Settings"
 msgstr "外觀設定"
 
 msgid "Appearance Settings"
 msgstr "外觀設定"
 
-#: src/main-dlg-ui.c:142
+#: src/main-dlg-ui.c:78
 msgid "Available Window Themes"
 msgstr "可用的視窗佈景主題"
 
 msgid "Available Window Themes"
 msgstr "可用的視窗佈景主題"
 
-#: src/main-dlg-ui.c:155
+#: src/main-dlg-ui.c:96
+msgid "_Font:"
+msgstr "字型"
+
+#: src/main-dlg-ui.c:108
 msgid "Window"
 msgstr "視窗"
 
 msgid "Window"
 msgstr "視窗"
 
-#: src/main-dlg-ui.c:163
+#: src/main-dlg-ui.c:116
 msgid "Available Icon Themes"
 msgstr "可用的圖示佈景主題"
 
 msgid "Available Icon Themes"
 msgstr "可用的圖示佈景主題"
 
-#: src/main-dlg-ui.c:177
+#: src/main-dlg-ui.c:131
 msgid "Icon"
 msgstr "圖示"
 
 msgid "Icon"
 msgstr "圖示"
 
-#: src/main-dlg-ui.c:185
-msgid "Available Fonts"
-msgstr "可用的字型"
-
-#: src/main-dlg-ui.c:203
-msgid "Font Size:"
-msgstr ""
-
-#: src/main-dlg-ui.c:216
-msgid "Style:"
-msgstr ""
-
-#: src/main-dlg-ui.c:229
-msgid "Font"
-msgstr ""
-
-#: src/main-dlg-ui.c:237
+#: src/main-dlg-ui.c:139
 msgid "Other"
 msgstr "其他"
 
 msgid "Other"
 msgstr "其他"
 
-#: src/main-dlg-ui.c:245
+#: src/main-dlg-ui.c:147
 msgid "<b>Preview</b>"
 msgstr "<b>預覽</b>"
 
 msgid "<b>Preview</b>"
 msgstr "<b>預覽</b>"
 
-#: src/main-dlg-ui.c:268
+#: src/demo-ui.c:116
 msgid "_File"
 msgstr "檔案(_F)"
 
 msgid "_File"
 msgstr "檔案(_F)"
 
-#: src/main-dlg-ui.c:300
+#: src/demo-ui.c:148
 msgid "_Edit"
 msgstr "編輯(_E)"
 
 msgid "_Edit"
 msgstr "編輯(_E)"
 
-#: src/main-dlg-ui.c:323
+#: src/demo-ui.c:171
 msgid "_Help"
 msgstr "說明(_H)"
 
 msgid "_Help"
 msgstr "說明(_H)"
 
-#: src/main-dlg-ui.c:344
+#: src/demo-ui.c:196
 msgid "Back"
 msgstr "上一頁"
 
 msgid "Back"
 msgstr "上一頁"
 
-#: src/main-dlg-ui.c:349
+#: src/demo-ui.c:201
 msgid "Forward"
 msgstr "下一頁"
 
 msgid "Forward"
 msgstr "下一頁"
 
-#: src/main-dlg-ui.c:354
+#: src/demo-ui.c:206
 msgid "Stop"
 msgstr "停止"
 
 msgid "Stop"
 msgstr "停止"
 
-#: src/main-dlg-ui.c:370
+#: src/demo-ui.c:222
 msgid "Tab1"
 msgstr "分頁1"
 
 msgid "Tab1"
 msgstr "分頁1"
 
-#: src/main-dlg-ui.c:392
-#: src/main-dlg-ui.c:398
+#: src/demo-ui.c:244
+#: src/demo-ui.c:250
 msgid "Radio Button"
 msgid "Radio Button"
-msgstr ""
+msgstr "Radio Button"
 
 
-#: src/main-dlg-ui.c:408
+#: src/demo-ui.c:260
 msgid "Check Button"
 msgid "Check Button"
-msgstr ""
+msgstr "Check Button"
 
 
-#: src/main-dlg-ui.c:417
+#: src/demo-ui.c:269
 msgid "Demo"
 msgid "Demo"
-msgstr ""
+msgstr "展示"
 
 
-#: src/main-dlg-ui.c:446
-msgid "button1"
-msgstr ""
+#: src/demo-ui.c:314
+msgid "button"
+msgstr "按鈕"
 
 
-#: src/main-dlg-ui.c:453
+#: src/demo-ui.c:321
 msgid "Test Item 1"
 msgstr "測試項目1"
 
 msgid "Test Item 1"
 msgstr "測試項目1"
 
-#: src/main-dlg-ui.c:454
+#: src/demo-ui.c:322
 msgid "Test Item 2"
 msgstr "測試項目2"
 
 msgid "Test Item 2"
 msgstr "測試項目2"
 
-#: src/main-dlg-ui.c:455
+#: src/demo-ui.c:323
 msgid "Test Item 3"
 msgstr "測試項目3"
 
 msgid "Test Item 3"
 msgstr "測試項目3"
 
-#: src/main-dlg-ui.c:457
+#: src/demo-ui.c:325
 msgid "Tab2"
 msgstr "分頁2"
 
 msgid "Tab2"
 msgstr "分頁2"
 
-#: src/main-dlg-ui.c:465
+#: src/demo-ui.c:338
+msgid "Type some characters here to test currently selected font."
+msgstr "在這裡打一些字測試目前選擇的字型"
+
+#: src/demo-ui.c:340
 msgid "Tab3"
 msgstr "分頁3"
 
 msgid "Tab3"
 msgstr "分頁3"
 
-#: src/glade-support.c:90
-#: src/glade-support.c:114
-#, c-format
-msgid "Couldn't find pixmap file: %s"
-msgstr ""
+#: src/demo-ui.c:355
+msgid "Tab4"
+msgstr "分頁4"
+
+#~ msgid "Available Fonts"
+#~ msgstr "可用的字型"
 
 
index 2823d5b..428c70b 100644 (file)
@@ -77,6 +77,10 @@ create_demo_window (void)
   GtkObject *spinbutton1_adj;
   GtkWidget *spinbutton1;
   GtkWidget *button1;
   GtkObject *spinbutton1_adj;
   GtkWidget *spinbutton1;
   GtkWidget *button1;
+  GtkWidget *alignment3;
+  GtkWidget *hbox4;
+  GtkWidget *image1;
+  GtkWidget *label18;
   GtkWidget *combobox2;
   GtkWidget *label13;
   GtkWidget *scrolledwindow5;
   GtkWidget *combobox2;
   GtkWidget *label13;
   GtkWidget *scrolledwindow5;
@@ -278,7 +282,7 @@ create_demo_window (void)
   gtk_progress_bar_set_fraction (GTK_PROGRESS_BAR (progressbar1), 0.6);
   gtk_progress_bar_set_text (GTK_PROGRESS_BAR (progressbar1), "60 %");
 
   gtk_progress_bar_set_fraction (GTK_PROGRESS_BAR (progressbar1), 0.6);
   gtk_progress_bar_set_text (GTK_PROGRESS_BAR (progressbar1), "60 %");
 
-  hscale1 = gtk_hscale_new (GTK_ADJUSTMENT (gtk_adjustment_new (0, 0, 0, 0, 0, 0)));
+  hscale1 = gtk_hscale_new (GTK_ADJUSTMENT (gtk_adjustment_new (0, 0, 100, 10, 0, 0)));
   gtk_widget_show (hscale1);
   gtk_box_pack_start (GTK_BOX (vbox7), hscale1, FALSE, TRUE, 0);
 
   gtk_widget_show (hscale1);
   gtk_box_pack_start (GTK_BOX (vbox7), hscale1, FALSE, TRUE, 0);
 
@@ -291,10 +295,26 @@ create_demo_window (void)
   gtk_widget_show (spinbutton1);
   gtk_box_pack_start (GTK_BOX (hbox3), spinbutton1, TRUE, TRUE, 0);
 
   gtk_widget_show (spinbutton1);
   gtk_box_pack_start (GTK_BOX (hbox3), spinbutton1, TRUE, TRUE, 0);
 
-  button1 = gtk_button_new_with_mnemonic (_("button1"));
+  button1 = gtk_button_new ();
   gtk_widget_show (button1);
   gtk_box_pack_start (GTK_BOX (hbox3), button1, FALSE, FALSE, 0);
 
   gtk_widget_show (button1);
   gtk_box_pack_start (GTK_BOX (hbox3), button1, FALSE, FALSE, 0);
 
+  alignment3 = gtk_alignment_new (0.5, 0.5, 0, 0);
+  gtk_widget_show (alignment3);
+  gtk_container_add (GTK_CONTAINER (button1), alignment3);
+
+  hbox4 = gtk_hbox_new (FALSE, 2);
+  gtk_widget_show (hbox4);
+  gtk_container_add (GTK_CONTAINER (alignment3), hbox4);
+
+  image1 = gtk_image_new_from_stock ("gtk-find", GTK_ICON_SIZE_BUTTON);
+  gtk_widget_show (image1);
+  gtk_box_pack_start (GTK_BOX (hbox4), image1, FALSE, FALSE, 0);
+
+  label18 = gtk_label_new_with_mnemonic (_("button"));
+  gtk_widget_show (label18);
+  gtk_box_pack_start (GTK_BOX (hbox4), label18, FALSE, FALSE, 0);
+
   combobox2 = gtk_combo_box_new_text ();
   gtk_widget_show (combobox2);
   gtk_box_pack_start (GTK_BOX (vbox7), combobox2, FALSE, TRUE, 0);
   combobox2 = gtk_combo_box_new_text ();
   gtk_widget_show (combobox2);
   gtk_box_pack_start (GTK_BOX (vbox7), combobox2, FALSE, TRUE, 0);
@@ -324,6 +344,7 @@ create_demo_window (void)
   scrolledwindow6 = gtk_scrolled_window_new (NULL, NULL);
   gtk_widget_show (scrolledwindow6);
   gtk_container_add (GTK_CONTAINER (notebook2), scrolledwindow6);
   scrolledwindow6 = gtk_scrolled_window_new (NULL, NULL);
   gtk_widget_show (scrolledwindow6);
   gtk_container_add (GTK_CONTAINER (notebook2), scrolledwindow6);
+  gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolledwindow6), GTK_POLICY_NEVER, GTK_POLICY_ALWAYS);
   gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (scrolledwindow6), GTK_SHADOW_IN);
 
   demo_treeview = gtk_tree_view_new ();
   gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (scrolledwindow6), GTK_SHADOW_IN);
 
   demo_treeview = gtk_tree_view_new ();
@@ -393,6 +414,10 @@ create_demo_window (void)
   GLADE_HOOKUP_OBJECT (demo_window, hbox3, "hbox3");
   GLADE_HOOKUP_OBJECT (demo_window, spinbutton1, "spinbutton1");
   GLADE_HOOKUP_OBJECT (demo_window, button1, "button1");
   GLADE_HOOKUP_OBJECT (demo_window, hbox3, "hbox3");
   GLADE_HOOKUP_OBJECT (demo_window, spinbutton1, "spinbutton1");
   GLADE_HOOKUP_OBJECT (demo_window, button1, "button1");
+  GLADE_HOOKUP_OBJECT (demo_window, alignment3, "alignment3");
+  GLADE_HOOKUP_OBJECT (demo_window, hbox4, "hbox4");
+  GLADE_HOOKUP_OBJECT (demo_window, image1, "image1");
+  GLADE_HOOKUP_OBJECT (demo_window, label18, "label18");
   GLADE_HOOKUP_OBJECT (demo_window, combobox2, "combobox2");
   GLADE_HOOKUP_OBJECT (demo_window, label13, "label13");
   GLADE_HOOKUP_OBJECT (demo_window, scrolledwindow5, "scrolledwindow5");
   GLADE_HOOKUP_OBJECT (demo_window, combobox2, "combobox2");
   GLADE_HOOKUP_OBJECT (demo_window, label13, "label13");
   GLADE_HOOKUP_OBJECT (demo_window, scrolledwindow5, "scrolledwindow5");
index 79e326e..df3e8b3 100644 (file)
@@ -45,7 +45,7 @@ static GtkWidget* demo_box = NULL;
 static GtkWidget* demo_socket = NULL;
 static GPid demo_pid = 0;
 
 static GtkWidget* demo_socket = NULL;
 static GPid demo_pid = 0;
 
-static void load_demo_process()
+static void reload_demo_process()
 {
     char* argv[5];
     char wid[16];
 {
     char* argv[5];
     char wid[16];
@@ -60,14 +60,6 @@ static void load_demo_process()
         demo_pid = 0;
     }
 
         demo_pid = 0;
     }
 
-    if( !demo_socket )
-    {
-        demo_socket = gtk_socket_new();
-        g_signal_connect( demo_socket, "plug-removed", G_CALLBACK(gtk_true), NULL );
-        gtk_widget_show( demo_socket );
-        gtk_container_add( (GtkContainer*)demo_box, demo_socket );
-    }
-
     g_snprintf( wid, 16, "%ld", gtk_socket_get_id(demo_socket) );
 
     argv[0] = g_get_prgname();
     g_snprintf( wid, 16, "%ld", gtk_socket_get_id(demo_socket) );
 
     argv[0] = g_get_prgname();
@@ -126,7 +118,7 @@ static void on_list_sel_changed( GtkTreeSelection* sel, const char* prop )
         }
         write_rc_file( tmp_rc_file );
         //gtk_rc_reparse_all_for_settings(gtk_settings_get_default(), TRUE);
         }
         write_rc_file( tmp_rc_file );
         //gtk_rc_reparse_all_for_settings(gtk_settings_get_default(), TRUE);
-        load_demo_process();
+        reload_demo_process();
         return;
     out:
         g_free( name );
         return;
     out:
         g_free( name );
@@ -227,6 +219,13 @@ static void load_fonts( GtkListStore* list )
 }
 */
 
 }
 */
 
+static void on_demo_loaded( GtkSocket* socket, GtkWidget* dlg )
+{
+    gtk_window_set_position( (GtkWindow*)dlg, GTK_WIN_POS_CENTER );
+    gtk_widget_show( dlg );
+    g_signal_handlers_disconnect_by_func( socket, on_demo_loaded, dlg );
+}
+
 void main_dlg_init( GtkWidget* dlg )
 {
     char* files[] = { tmp_rc_file, NULL };
 void main_dlg_init( GtkWidget* dlg )
 {
     char* files[] = { tmp_rc_file, NULL };
@@ -263,11 +262,16 @@ void main_dlg_init( GtkWidget* dlg )
     /* INIT_LIST( font, "gtk-font-name" ) */
 
     GET_WIDGET( demo_box );
     /* INIT_LIST( font, "gtk-font-name" ) */
 
     GET_WIDGET( demo_box );
-
     gtk_widget_show( demo_box );
     gtk_widget_show( demo_box );
-//    gtk_widget_set_app_paintable( demo_socket, TRUE );
+
+    demo_socket = gtk_socket_new();
+    g_signal_connect( demo_socket, "plug-added", G_CALLBACK(on_demo_loaded), dlg );
+    g_signal_connect( demo_socket, "plug-removed", G_CALLBACK(gtk_true), NULL );
+    gtk_widget_show( demo_socket );
+    gtk_container_add( (GtkContainer*)demo_box, demo_socket );
+
     gtk_widget_realize( dlg );
     gtk_widget_realize( dlg );
-    load_demo_process();
+    reload_demo_process();
 }
 
 static void reload_all_programs( gboolean icon_only )
 }
 
 static void reload_all_programs( gboolean icon_only )
@@ -305,6 +309,6 @@ on_font_changed                        (GtkFontButton   *fontbutton,
     g_free( font_name );
     font_name = g_strdup( name );
     write_rc_file( tmp_rc_file );
     g_free( font_name );
     font_name = g_strdup( name );
     write_rc_file( tmp_rc_file );
-    load_demo_process();
+    reload_demo_process();
 }
 
 }
 
index e0dad15..6d031e1 100644 (file)
@@ -41,7 +41,6 @@ int main (int argc, char *argv[])
 
     dlg = create_dlg ();
     main_dlg_init( dlg );
 
     dlg = create_dlg ();
     main_dlg_init( dlg );
-    gtk_widget_show (dlg);
 
     gtk_main ();
     return 0;
 
     gtk_main ();
     return 0;