[gimp] Bug 132509 – Allow to choose language in text tool



commit bf8885f637ae288e429f6df87ca7ae29a5db17e0
Author: Sven Neumann <sven gimp org>
Date:   Tue Aug 4 21:27:14 2009 +0200

    Bug 132509 â?? Allow to choose language in text tool
    
    Remove the commented out language entry from the text editor and add
    one to the text tool options instead. Work in progress...

 app/tools/gimptextoptions.c  |   17 +++++++++++++++++
 app/widgets/gimptexteditor.c |   29 -----------------------------
 2 files changed, 17 insertions(+), 29 deletions(-)
---
diff --git a/app/tools/gimptextoptions.c b/app/tools/gimptextoptions.c
index 7b756d2..b7d763b 100644
--- a/app/tools/gimptextoptions.c
+++ b/app/tools/gimptextoptions.c
@@ -429,6 +429,7 @@ gimp_text_options_gui (GimpToolOptions *tool_options)
   GtkWidget       *button;
   GtkWidget       *entry;
   GtkWidget       *box;
+  GtkWidget       *label;
   GtkWidget       *spinbutton;
   GtkSizeGroup    *size_group;
   gint             row = 0;
@@ -514,6 +515,22 @@ gimp_text_options_gui (GimpToolOptions *tool_options)
   gimp_table_attach_stock (GTK_TABLE (table), row++,
                            GIMP_STOCK_LETTER_SPACING, spinbutton, 1, TRUE);
 
+  vbox = gtk_vbox_new (FALSE, 2);
+  gtk_box_pack_start (GTK_BOX (main_vbox), vbox, FALSE, FALSE, 0);
+  gtk_widget_show (vbox);
+
+  hbox = gtk_hbox_new (FALSE, 0);
+  gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 0);
+  gtk_widget_show (hbox);
+
+  label = gtk_label_new (_("Language:"));
+  gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 0);
+  gtk_widget_show (label);
+
+  entry = gimp_prop_language_entry_new (config, "language");
+  gtk_box_pack_start (GTK_BOX (vbox), entry, FALSE, FALSE, 0);
+  gtk_widget_show (entry);
+
   return main_vbox;
 }
 
diff --git a/app/widgets/gimptexteditor.c b/app/widgets/gimptexteditor.c
index a176bb1..9c53c6d 100644
--- a/app/widgets/gimptexteditor.c
+++ b/app/widgets/gimptexteditor.c
@@ -30,7 +30,6 @@
 
 #include "gimphelp-ids.h"
 #include "gimpmenufactory.h"
-#include "gimplanguageentry.h"
 #include "gimptexteditor.h"
 #include "gimpuimanager.h"
 
@@ -172,34 +171,6 @@ gimp_text_editor_new (const gchar     *title,
     {
       gtk_box_pack_start (GTK_BOX (content_area), toolbar, FALSE, FALSE, 0);
       gtk_widget_show (toolbar);
-
-      /*  language entry, disabled until it works  */
-      if (FALSE)
-        {
-          GtkToolItem *item;
-          GtkWidget   *hbox;
-          GtkWidget   *label;
-          GtkWidget   *entry;
-
-          item = gtk_tool_item_new ();
-          gtk_tool_item_set_expand (item, TRUE);
-          gtk_toolbar_insert (GTK_TOOLBAR (toolbar), item, -1);
-          gtk_widget_show (GTK_WIDGET (item));
-
-          hbox = gtk_hbox_new (FALSE, 6);
-          gtk_container_add (GTK_CONTAINER (item), hbox);
-          gtk_widget_show (hbox);
-
-          label = gtk_label_new_with_mnemonic (_("_Language:"));
-          gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 0);
-          gtk_widget_show (label);
-
-          entry = gimp_language_entry_new ();
-          gtk_box_pack_start (GTK_BOX (hbox), entry, TRUE, TRUE, 0);
-          gtk_widget_show (entry);
-
-          gtk_label_set_mnemonic_widget (GTK_LABEL (label), entry);
-        }
     }
 
   scrolled_window = gtk_scrolled_window_new (NULL, NULL);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]