[gtranslator] translation-memory: draw method not needed at all



commit 9befd9bc82348c6affafc31ef7847b5657417cff
Author: Ignacio Casal Quinteiro <icq gnome org>
Date:   Tue Apr 3 10:33:22 2012 +0200

    translation-memory: draw method not needed at all

 .../translation-memory/gtr-translation-memory-ui.c |   24 +++++++------------
 1 files changed, 9 insertions(+), 15 deletions(-)
---
diff --git a/plugins/translation-memory/gtr-translation-memory-ui.c b/plugins/translation-memory/gtr-translation-memory-ui.c
index c58c172..4d98b15 100644
--- a/plugins/translation-memory/gtr-translation-memory-ui.c
+++ b/plugins/translation-memory/gtr-translation-memory-ui.c
@@ -465,21 +465,26 @@ tree_view_popup_menu (GtkTreeView *tree, GtrTranslationMemoryUi *tm_ui)
 }
 
 static void
-gtr_translation_memory_ui_draw (GtrTranslationMemoryUi * tm_ui)
+gtr_translation_memory_ui_init (GtrTranslationMemoryUi * tm_ui)
 {
-  GtrTranslationMemoryUiPrivate *priv = tm_ui->priv;
+  GtrTranslationMemoryUiPrivate *priv;
   GtkListStore *model;
   GtkCellRenderer *level_renderer, *string_renderer, *shortcut_renderer;
   GtkTreeViewColumn *shortcut, *string, *level;
 
+  tm_ui->priv = GTR_TRANSLATION_MEMORY_UI_GET_PRIVATE (tm_ui);
+  priv = tm_ui->priv;
+  tm_ui->priv->tm_list = NULL;
+  tm_ui->priv->popup_menu = NULL;
+  tm_ui->priv->msg = NULL;
+
   priv->tree_view = gtk_tree_view_new ();
   gtk_widget_show (priv->tree_view);
 
   gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (tm_ui),
                                   GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);
 
-  model =
-    gtk_list_store_new (N_COLUMNS, G_TYPE_INT, G_TYPE_INT, G_TYPE_STRING);
+  model = gtk_list_store_new (N_COLUMNS, G_TYPE_INT, G_TYPE_INT, G_TYPE_STRING);
   gtk_tree_view_set_model (GTK_TREE_VIEW (priv->tree_view),
                            GTK_TREE_MODEL (model));
 
@@ -528,17 +533,6 @@ gtr_translation_memory_ui_draw (GtrTranslationMemoryUi * tm_ui)
 }
 
 static void
-gtr_translation_memory_ui_init (GtrTranslationMemoryUi * tm_ui)
-{
-  tm_ui->priv = GTR_TRANSLATION_MEMORY_UI_GET_PRIVATE (tm_ui);
-  tm_ui->priv->tm_list = NULL;
-  tm_ui->priv->popup_menu = NULL;
-  tm_ui->priv->msg = NULL;
-
-  gtr_translation_memory_ui_draw (tm_ui);
-}
-
-static void
 gtr_translation_memory_ui_dispose (GObject * object)
 {
   GtrTranslationMemoryUi *tm_ui = GTR_TRANSLATION_MEMORY_UI (object);



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