[Geeqie-devel] preferences.c - patch for FIXMEs
Hi Attached is a patch for two minor FIXMEs in the preferences page. In the Files tab: when Add is pressed scroll to the new entry and set focus to the file-type field In the Files tab: when Defaults is selected scroll to column 0, row 0 In the Keyboard tab: when Defaults is pressed scroll to column 0, row 0 These are just cosmetic changes, so are not really of interest until the next release happens. Colin Clark diff --git a/src/preferences.c b/src/preferences.c index bedc10b..d088bc2 100644 --- a/src/preferences.c +++ b/src/preferences.c @@ -712,12 +712,48 @@ static void filter_set_func(GtkTreeViewColumn *tree_column, GtkCellRenderer *cel } } +static gboolean filter_add_scroll(gpointer data) +{ + GtkTreePath *path; + GList *list_cells; + GtkCellRenderer *cell; + GtkTreeViewColumn *column; + GList *list_columns; + const gchar *title; + guint i = 0; + gint rows; + + rows = gtk_tree_model_iter_n_children(GTK_TREE_MODEL(filter_store), NULL); + path = gtk_tree_path_new_from_indices(rows-1, -1); + + list_columns = gtk_tree_view_get_columns(GTK_TREE_VIEW(data)); + do { + column = g_list_nth(list_columns,i)-data; + title = gtk_tree_view_column_get_title(GTK_TREE_VIEW_COLUMN(column)); + i++; + } while (strcmp(title, Filter) !=0 ); + + list_cells = gtk_cell_layout_get_cells(GTK_CELL_LAYOUT(column)); + cell = g_list_last(list_cells)-data; + + gtk_tree_view_scroll_to_cell(GTK_TREE_VIEW(data), +path, column, FALSE, 0.0, 0.0 ); + gtk_tree_view_set_cursor_on_cell(GTK_TREE_VIEW(data), +path, column, cell, TRUE); + + gtk_tree_path_free(path); + g_list_free(list_cells); + g_list_free(list_columns); + + return(FALSE); +} + static void filter_add_cb(GtkWidget *widget, gpointer data) { filter_add_unique(description, .new, FORMAT_CLASS_IMAGE, TRUE, FALSE, TRUE); filter_store_populate(); - /* FIXME: implement the scroll to/select row stuff for tree view */ + g_idle_add((GSourceFunc)filter_add_scroll, data); } static void filter_remove_cb(GtkWidget *widget, gpointer data) @@ -738,12 +774,33 @@ static void filter_remove_cb(GtkWidget *widget, gpointer data) filter_store_populate(); } +static gboolean filter_default_ok_scroll(GtkTreeView *data) +{ + GtkTreeIter iter; + GtkTreePath *path; + GtkTreeViewColumn *column; + + gtk_tree_model_get_iter_first(GTK_TREE_MODEL(filter_store), iter); + path = gtk_tree_model_get_path(GTK_TREE_MODEL(filter_store), iter); + column = gtk_tree_view_get_column(GTK_TREE_VIEW(data),0); + + gtk_tree_view_scroll_to_cell(GTK_TREE_VIEW(data), + path, column, + FALSE, 0.0, 0.0); + +gtk_tree_path_free(path); + + return(FALSE); +} + static void filter_default_ok_cb(GenericDialog *gd, gpointer data) { filter_reset(); filter_add_defaults(); filter_rebuild(); filter_store_populate(); + + g_idle_add((GSourceFunc)filter_default_ok_scroll, gd-data); } static void dummy_cancel_cb(GenericDialog *gd, gpointer data) @@ -757,7 +814,7 @@ static void filter_default_cb(GtkWidget *widget, gpointer data) gd = generic_dialog_new(_(Reset filters), reset_filter, widget, TRUE, -dummy_cancel_cb, NULL); +dummy_cancel_cb, data); generic_dialog_add_message(gd, GTK_STOCK_DIALOG_QUESTION, _(Reset filters), _(This will reset the file filters to the defaults.\nContinue?)); generic_dialog_add_button(gd, GTK_STOCK_OK, NULL, filter_default_ok_cb, TRUE); @@ -969,11 +1026,30 @@ static void accel_store_edited_cb(GtkCellRendererAccel *accel, gchar *path_strin g_free(acc); } +static gboolean accel_default_scroll(GtkTreeView *data) +{ + GtkTreeIter iter; + GtkTreePath *path; + GtkTreeViewColumn *column; + + gtk_tree_model_get_iter_first(GTK_TREE_MODEL(accel_store), iter); + path = gtk_tree_model_get_path(GTK_TREE_MODEL(accel_store), iter); + column = gtk_tree_view_get_column(GTK_TREE_VIEW(data),0); + + gtk_tree_view_scroll_to_cell(GTK_TREE_VIEW(data), + path, column, + FALSE, 0.0, 0.0); + +gtk_tree_path_free(path); + + return(FALSE); +} + static void accel_default_cb(GtkWidget *widget, gpointer data) { accel_store_populate(); - /* FIXME: implement the scroll to/select row stuff for tree view */ + g_idle_add((GSourceFunc)accel_default_scroll, data); } void accel_remove_selection(GtkTreeModel *model, GtkTreePath *path, GtkTreeIter *iter, gpointer data) @@ -1571,7 +1647,7 @@ static void config_tab_files(GtkWidget *notebook) hbox = pref_box_new(group, FALSE, GTK_ORIENTATION_HORIZONTAL, PREF_PAD_BUTTON_GAP); button = pref_button_new(NULL, NULL, _(Defaults), FALSE, - G_CALLBACK(filter_default_cb), NULL); + G_CALLBACK(filter_default_cb), filter_view); gtk_box_pack_end(GTK_BOX(hbox), button, FALSE, FALSE, 0); gtk_widget_show(button); @@ -1581,7 +1657,7 @@ static void
Re: [Geeqie-devel] Geeqie.desktop
-BEGIN PGP SIGNED MESSAGE- Hash: SHA512 Hi Tore, I answer to the list as it might be for interest for other too. Am Mo den 27. Dez 2010 um 20:12 schrieb Tore Ericsson: No, I don't know howto, since I have never participated in any net-project before and need detailed instructions. However, taking part in such a language subproject is perhaps just enough to start with? So, please give me a beginner's intro an I'll have a try to get involved! I'll try to. Needed Software is: - - git (For Sourcemanagement. In debian, package git or git-core, depending on the version you use.) - - poedit (To edit the translations, there are other ways but this tool seems to be the easiest one.) - - intltool First you need a checkout of geeqie on your local system. With the current repository it is pretty easy; just type 'git clone git://github.com/zas/geeqie_zas.git' and you have all sources in the directory geeqie_zas. Go to the directory geeqie_zas/po and issue git 'checkout -b swedish origin/master' to create your own tracking branch for the main trunk. As there is no Swedish translation until now you have to start with 'cp geeqie.pot se.po' and edit the header of se.po to fulfil the Swedish language. (CHARSET in Content-Type is the most important. one.) Then you can run 'intltool-update se' to update the Swedish po-file. You do this command also regularly if source is updated or before a checkin. (The last one is important as poedit reformats the comments in the file.) After that you can start 'poedit se.po' and you can start the translation. For the begin just start with translations that are unambiguous. You can rearrange the sentences but keep in mind that they might be only part of another sentence. If you are in doubt, just ask. After your edit you add and commit the file to git: 'git add se.po; git commit -m Started with Swedish translation' Then you can generate the patches with 'git format-patch origin/master' and send it to the list. If Laurent give you commit rights you can commit directly but that needs some small additional steps that I do not address here for the moment. For the correctness, the se translation has also to be enabled in the makefile template respective in file LINGUAS. But that can be done later by one who is familiar with that process. Best regards and a happy end of 2010! Thanks allot. The same for you. Regards Klaus Ps. If I forget something, please add. - -- Klaus Ethgenhttp://www.ethgen.ch/ pub 2048R/D1A4EDE5 2000-02-26 Klaus Ethgen kl...@ethgen.de Fingerprint: D7 67 71 C4 99 A6 D4 FE EA 40 30 57 3C 88 26 2B -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.10 (GNU/Linux) iQEVAwUBTRnmL5+OKpjRpO3lAQootgf/a0XQuJuEb1N6keeGdkmZZ6civcBtdv39 iRKXQygZNpMVGIoQV9ZXwel5hXi2wDBwrzrhrG592rMCw74EcE3jqTh6Gd29x6z1 pwxqXJsOuXqL0PlEObMRfRDIcaoL6wBPhTU1MSac8BiNbYBOIjGLXS2j4BHTKR9J s8nvbAf2Lur04GXABj1m5oRwpssVSN/Efvro1eetN9yVNi3vi8jzzwVaqPQIt+9G Yv98laS4Nkxrco3u9QMHl/nzuVqDjrrfXNQJHDTs0kOKkunl5Notu6nsgH13nKiE YjYRUj746Oc6jTRZ0gKEKuMS5WZ6tavO5MVFCeKw774c91HMeZukbw== =Pmh0 -END PGP SIGNATURE- -- Learn how Oracle Real Application Clusters (RAC) One Node allows customers to consolidate database storage, standardize their database environment, and, should the need arise, upgrade to a full multi-node Oracle RAC database without downtime or disruption http://p.sf.net/sfu/oracle-sfdevnl ___ Geeqie-devel mailing list Geeqie-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/geeqie-devel
Re: [Geeqie-devel] Geeqie.desktop
Klaus Ethgen a écrit : Go to the directory geeqie_zas/po and issue git 'checkout -b swedish origin/master' to create your own tracking branch for the main trunk. As there is no Swedish translation until now you have to start with 'cp geeqie.pot se.po' and edit the header of se.po to fulfil the Swedish language. (CHARSET in Content-Type is the most important. one.) In fact, there is a swedish translation named po/sv.po: # Swedish translations for gqview package # Svenska �vers�ttningar f�r paketet gqview. # Copyright (C) 2003 John Ellis # This file is distributed under the same license as the gqview package. # Hans �fverbeck hans.ofverb...@home.se, 2003-2005. # msgid msgstr Project-Id-Version: gqview 1.5.7\n Report-Msgid-Bugs-To: \n POT-Creation-Date: 2008-05-13 22:14+0200\n PO-Revision-Date: 2005-02-01 23:26+0100\n Last-Translator: Hans Ofverbeck hans.ofverb...@home.se\n Language-Team: Swedish s...@li.org\n MIME-Version: 1.0\n Content-Type: text/plain; charset=ISO-8859-1\n Content-Transfer-Encoding: 8bit\n Plural-Forms: nplurals=2; plural=(n != 1);\n It is very incomplete though. I don't know what should be the correct name (sv.po versus se.po), but if se.po is more correct then we should change it. BTW, nice guide Klaus, perhaps worth to add it to the wiki on github. -- Zas -- Learn how Oracle Real Application Clusters (RAC) One Node allows customers to consolidate database storage, standardize their database environment, and, should the need arise, upgrade to a full multi-node Oracle RAC database without downtime or disruption http://p.sf.net/sfu/oracle-sfdevnl ___ Geeqie-devel mailing list Geeqie-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/geeqie-devel
Re: [Geeqie-devel] Geeqie.desktop
Från Laurent Monin z...@norz.org 2010-12-28 20.18.01: Klaus Ethgen a écrit : Go to the directory geeqie_zas/po and issue git 'checkout -b swedish origin/master' to create your own tracking branch for the main trunk. As Note 'git checkout -b swedish origin/master' there is no Swedish translation until now you have to start with 'cp geeqie.pot se.po' and edit the header of se.po to fulfil the Swedish language. (CHARSET in Content-Type is the most important. one.) In fact, there is a swedish translation named po/sv.po: # Swedish translations for gqview package # Svenska �vers�ttningar f�r paketet gqview. # Copyright (C) 2003 John Ellis # This file is distributed under the same license as the gqview package. # Hans �fverbeck hans.ofverb...@home.se, 2003-2005. # msgid msgstr Project-Id-Version: gqview 1.5.7\n Report-Msgid-Bugs-To: \n POT-Creation-Date: 2008-05-13 22:14+0200\n PO-Revision-Date: 2005-02-01 23:26+0100\n Last-Translator: Hans Ofverbeck hans.ofverb...@home.se\n Language-Team: Swedish s...@li.org\n MIME-Version: 1.0\n Content-Type: text/plain; charset=ISO-8859-1\n Assume should be changed to UTF-8. Content-Transfer-Encoding: 8bit\n Plural-Forms: nplurals=2; plural=(n != 1);\n It is very incomplete though. I don't know what should be the correct name (sv.po versus se.po), but if se.po is more correct then we should change it. Well if I remember right, 'se' should be correct; isn't se_sv and se_fi used to distinguish the Swedish language practised in Sweden and in Finland, respectively, when that is important? Anyhow, we don't need such refinements here! BTW, nice guide Klaus, perhaps worth to add it to the wiki on github. -- Zas Found no .pot file, generated geeqie.pot with 'intltool-update -p', OK? Is it useful? If a change to 'se' is preferred: The sv.po may perhaps be reused by making a copy 'se.po' (or using 'Save as ...' in Poedit?) and adding 'se' into LINGUAS? Next, edit the 'se.po' according to 'geeqie.pot' - and into the right charset (I would prefer UTF-8 as a universal and my standard). How/when do we remove the 'sv' version, according to any git-rules? - Maybe simply delete etc.? Tore -- Learn how Oracle Real Application Clusters (RAC) One Node allows customers to consolidate database storage, standardize their database environment, and, should the need arise, upgrade to a full multi-node Oracle RAC database without downtime or disruption http://p.sf.net/sfu/oracle-sfdevnl ___ Geeqie-devel mailing list Geeqie-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/geeqie-devel