gtranslator r3638 - in trunk/src: . translation-memory
- From: icq svn gnome org
- To: svn-commits-list gnome org
- Subject: gtranslator r3638 - in trunk/src: . translation-memory
- Date: Mon, 22 Sep 2008 09:40:23 +0000 (UTC)
Author: icq
Date: Mon Sep 22 09:40:23 2008
New Revision: 3638
URL: http://svn.gnome.org/viewvc/gtranslator?rev=3638&view=rev
Log:
* translation-memory/translation-memory-ui.c:
(showed_message_cb): Limit the options showed in the
translation memory tab to ten results.
Modified:
trunk/src/ChangeLog
trunk/src/translation-memory/translation-memory-ui.c
Modified: trunk/src/translation-memory/translation-memory-ui.c
==============================================================================
--- trunk/src/translation-memory/translation-memory-ui.c (original)
+++ trunk/src/translation-memory/translation-memory-ui.c Mon Sep 22 09:40:23 2008
@@ -128,6 +128,7 @@
const gchar *msgid;
gint i = 1;
gint j = 1;
+ gint k = 0;
GList *tm_list_unsorted = NULL;
GList *tm_list = NULL;
GList *l = NULL;
@@ -161,7 +162,7 @@
tm_list_unsorted = gtranslator_translation_memory_lookup (tm,
msgid);
tm_list = g_list_sort (tm_list_unsorted,
- (GCompareFunc) compare_level);
+ (GCompareFunc) compare_level);
if (tm_list == NULL) {
gtk_widget_set_sensitive (tm_menu, FALSE);
} else {
@@ -191,13 +192,16 @@
gtk_list_store_set (model,
&iter,
SHORTCUT_COLUMN,
- GDK_0+i,
+ GDK_0+k,
STRING_COLUMN,
match->match,
LEVEL_COLUMN,
match->level,
-1);
i++;
+ k++;
+ if (k>9)
+ break;
}
gtranslator_msg_set_tm_list (msg, data);
@@ -222,7 +226,7 @@
accel_path = g_strdup_printf ("<Gtranslator-sheet>/Edit/_Insert Tags/%s", item_name);
gtk_menu_item_set_accel_path (GTK_MENU_ITEM (tm_item), accel_path);
- gtk_accel_map_add_entry (accel_path, GDK_0+j, GDK_CONTROL_MASK);
+ gtk_accel_map_add_entry (accel_path, GDK_0+(j-1), GDK_CONTROL_MASK);
g_free (accel_path);
g_free (item_name);
@@ -232,7 +236,8 @@
gtk_menu_shell_append (GTK_MENU_SHELL (items_menu), tm_item);
j++;
- }while ((tm_list = g_list_next (tm_list)));
+ }while (j<=9);
+ //while ((tm_list = g_list_next (tm_list)));
gtk_menu_item_set_submenu (GTK_MENU_ITEM (tm_menu), items_menu);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]