[Xfce4-commits] ristretto:ristretto-0.6 Fix segfault when image-quality property is changed
Updating branch refs/heads/ristretto-0.6 to c67e31e724c64ce0b84deddc375be0aab07ce183 (commit) from f85326c438d2312ff1e9bfd6c6c175903a22e91b (commit) commit c67e31e724c64ce0b84deddc375be0aab07ce183 Author: Stephan Arts step...@xfce.org Date: Sat May 5 08:45:33 2012 +0200 Fix segfault when image-quality property is changed src/image_viewer.c | 11 +++ 1 files changed, 7 insertions(+), 4 deletions(-) diff --git a/src/image_viewer.c b/src/image_viewer.c index 58e66c4..8ef31ad 100644 --- a/src/image_viewer.c +++ b/src/image_viewer.c @@ -2794,10 +2794,13 @@ cb_rstto_limit_quality_changed ( viewer-priv-limit_quality = g_value_get_boolean ( val_limit_quality); -rstto_image_viewer_load_image ( -viewer, -viewer-priv-file, -viewer-priv-scale); +if ( NULL != viewer-priv-file ) +{ +rstto_image_viewer_load_image ( +viewer, +viewer-priv-file, +viewer-priv-scale); +} } static void ___ Xfce4-commits mailing list Xfce4-commits@xfce.org https://mail.xfce.org/mailman/listinfo/xfce4-commits
[Xfce4-commits] ristretto:master Fix segfault when image-quality property is changed
Updating branch refs/heads/master to 8c3ab2d2aefff1d859cdb07fbaeeec5f3ec2b2e5 (commit) from 1a7ec2adb967df1e393d6248ead33e81793c709d (commit) commit 8c3ab2d2aefff1d859cdb07fbaeeec5f3ec2b2e5 Author: Stephan Arts step...@xfce.org Date: Sat May 5 08:45:33 2012 +0200 Fix segfault when image-quality property is changed src/image_viewer.c | 11 +++ 1 files changed, 7 insertions(+), 4 deletions(-) diff --git a/src/image_viewer.c b/src/image_viewer.c index 58e66c4..8ef31ad 100644 --- a/src/image_viewer.c +++ b/src/image_viewer.c @@ -2794,10 +2794,13 @@ cb_rstto_limit_quality_changed ( viewer-priv-limit_quality = g_value_get_boolean ( val_limit_quality); -rstto_image_viewer_load_image ( -viewer, -viewer-priv-file, -viewer-priv-scale); +if ( NULL != viewer-priv-file ) +{ +rstto_image_viewer_load_image ( +viewer, +viewer-priv-file, +viewer-priv-scale); +} } static void ___ Xfce4-commits mailing list Xfce4-commits@xfce.org https://mail.xfce.org/mailman/listinfo/xfce4-commits
[Xfce4-commits] xfce4-appfinder:xfce-4.10 l10n: Updates to Croatian (hr) translation
Updating branch refs/heads/xfce-4.10 to d5fb1216e5706e1f6fd73e39f4edbc6a1600651c (commit) from e9a079ecc9127b30febd5abc8e18c086e1b43bc0 (commit) commit d5fb1216e5706e1f6fd73e39f4edbc6a1600651c Author: Ivica Kolić ik...@yahoo.com Date: Sat May 5 09:39:01 2012 +0200 l10n: Updates to Croatian (hr) translation New status: 54 messages complete with 0 fuzzies and 14 untranslated. Transmitted-via: Transifex (translations.xfce.org). po/hr.po | 66 ++--- 1 files changed, 28 insertions(+), 38 deletions(-) diff --git a/po/hr.po b/po/hr.po index 01b3d96..990bf8b 100644 --- a/po/hr.po +++ b/po/hr.po @@ -7,14 +7,14 @@ msgid msgstr Project-Id-Version: xfce4-appfinder\n Report-Msgid-Bugs-To: \n -POT-Creation-Date: 2012-04-09 05:39+\n -PO-Revision-Date: 2010-06-05 10:42+0200\n -Last-Translator: Ivica Kolićik...@yahoo.com \n +POT-Creation-Date: 2012-05-05 05:24+\n +PO-Revision-Date: 2012-05-05 09:26+0100\n +Last-Translator: Ivica Kolić ik...@yahoo.com\n Language-Team: Croatian \n +Language: hr\n MIME-Version: 1.0\n Content-Type: text/plain; charset=UTF-8\n Content-Transfer-Encoding: 8bit\n -Language: hr\n Plural-Forms: nplurals=3; plural=(n%10==1 n%100!=11 ? 0 : n%10=2 n%10=4 (n%10010 || n%100=20) ? 1 : 2);\n #: ../src/appfinder-category-model.c:146 @@ -41,11 +41,11 @@ msgstr Kategorije msgid Filename msgstr Ime datoteke -#: ../src/appfinder-model.c:1825 +#: ../src/appfinder-model.c:1829 msgid Application has no command msgstr Program nema naredbe -#: ../src/appfinder-model.c:2149 +#: ../src/appfinder-model.c:2153 msgid Commands History msgstr Povijest naredbi @@ -70,7 +70,8 @@ msgstr Prilagođena akcija biti će trajno izbrisana. msgid Are you sure you want to delete pattern \%s\? msgstr Jeste li sigurni da želite izbrisati uzorak \%s\? -#: ../src/appfinder-window.c:219 ../src/main.c:446 +#: ../src/appfinder-window.c:219 +#: ../src/main.c:446 #: ../src/appfinder-preferences.glade.h:4 #: ../data/xfce4-appfinder.desktop.in.h:1 msgid Application Finder @@ -86,15 +87,11 @@ msgstr Po_kreni #: ../src/appfinder-window.c:798 msgid Failed to launch desktop item editor -msgstr +msgstr Neuspjelo pokretanje uređivača stavki radne površine #: ../src/appfinder-window.c:824 -msgid -This will permanently remove the custom desktop file from your home -directory. -msgstr -Ovo će trajno ukloniti prilagođenu datoteku radne površine iz vaše osobne -mape. +msgid This will permanently remove the custom desktop file from your home directory. +msgstr Ovo će trajno ukloniti prilagođenu datoteku radne površine iz vaše osobne mape. #: ../src/appfinder-window.c:825 #, c-format @@ -103,20 +100,19 @@ msgstr #: ../src/appfinder-window.c:835 msgid Failed to remove desktop file -msgstr +msgstr Neuspjelo uklanjanje datoteke radne površine #. I18N: the first %s will be replace with users' applications directory, the #. * second with Hidden=true #: ../src/appfinder-window.c:868 #, c-format -msgid -To unhide the item you have to manually remove the desktop file from \%s\ -or open the file in the same directory and remove the line \%s\. +msgid To unhide the item you have to manually remove the desktop file from \%s\ or open the file in the same directory and remove the line \%s\. msgstr -#: ../src/appfinder-window.c:873 ../src/appfinder-window.c:958 +#: ../src/appfinder-window.c:873 +#: ../src/appfinder-window.c:965 msgid _Hide -msgstr +msgstr _Sakrij #: ../src/appfinder-window.c:874 #, c-format @@ -176,7 +172,7 @@ msgstr Uvijek c_entriraj prozor #: ../src/appfinder-preferences.glade.h:3 msgid Appearance -msgstr +msgstr Izgled #: ../src/appfinder-preferences.glade.h:5 msgid Behaviour @@ -188,7 +184,7 @@ msgstr O_čisti povijest prilagođenih naredbi #: ../src/appfinder-preferences.glade.h:7 msgid Categ_ory icon size: -msgstr +msgstr Veli_čina ikone kategorije #: ../src/appfinder-preferences.glade.h:8 msgid Center the window on startup. @@ -208,22 +204,16 @@ msgstr Povijest #: ../src/appfinder-preferences.glade.h:13 #, no-c-format -msgid -If the type is set to prefix, %s will be replaced with the string after the -pattern, %S with the complete entry text. For regular expressions you can -use \\0 and \\num. +msgid If the type is set to prefix, %s will be replaced with the string after the pattern, %S with the complete entry text. For regular expressions you can use \\0 and \\num. msgstr #: ../src/appfinder-preferences.glade.h:14 -msgid -Instead of quitting the application when the last window is closed, keep a -running instance to speed up opening new windows. You might want to disable -this to reduce memory usage. +msgid Instead of quitting the application when the last window is closed, keep a running instance to speed up opening new windows. You might want to disable this to reduce memory usage. msgstr #:
[Xfce4-commits] libxfce4ui:stephan/gtk3 Free device list.
Updating branch refs/heads/stephan/gtk3 to 11a64363e2b8525426e7dd707b88359c7129dc35 (commit) from 34573fe70a99aed23ef2f830fca28b232f16cb82 (commit) commit 11a64363e2b8525426e7dd707b88359c7129dc35 Author: Nick Schermer n...@xfce.org Date: Sat May 5 10:17:10 2012 +0200 Free device list. libxfce4kbd-private/xfce-shortcut-dialog.c |2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/libxfce4kbd-private/xfce-shortcut-dialog.c b/libxfce4kbd-private/xfce-shortcut-dialog.c index f395831..b057566 100644 --- a/libxfce4kbd-private/xfce-shortcut-dialog.c +++ b/libxfce4kbd-private/xfce-shortcut-dialog.c @@ -301,6 +301,8 @@ xfce_shortcut_dialog_run (XfceShortcutDialog *dialog, } } + g_list_free (devices); + /* Take control on the keyboard */ if (succeed) { ___ Xfce4-commits mailing list Xfce4-commits@xfce.org https://mail.xfce.org/mailman/listinfo/xfce4-commits
[Xfce4-commits] xfce4-mpc-plugin:master l10n: Initial Croatian (hr) translation
Updating branch refs/heads/master to a1452ccdf800c5f9a9f058ce8953b70b797bddfd (commit) from 1f3748f52e547438bc1e6e3fe81d226f4a817880 (commit) commit a1452ccdf800c5f9a9f058ce8953b70b797bddfd Author: Ivica Kolić ik...@yahoo.com Date: Sat May 5 10:36:59 2012 +0200 l10n: Initial Croatian (hr) translation New status: 15 messages complete with 0 fuzzies and 9 untranslated. Transmitted-via: Transifex (translations.xfce.org). po/{xfce4-mpc-plugin.pot = hr.po} | 54 ++- 1 files changed, 28 insertions(+), 26 deletions(-) diff --git a/po/xfce4-mpc-plugin.pot b/po/hr.po similarity index 66% copy from po/xfce4-mpc-plugin.pot copy to po/hr.po index fb02951..7459201 100644 --- a/po/xfce4-mpc-plugin.pot +++ b/po/hr.po @@ -1,27 +1,30 @@ -# SOME DESCRIPTIVE TITLE. +# Croatian translation for xfce4-mpc-plugin package. # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER -# This file is distributed under the same license as the PACKAGE package. +# This file is distributed under the same license as the xfce4-mpc-plugin package. # FIRST AUTHOR EMAIL@ADDRESS, YEAR. # -#, fuzzy msgid msgstr -Project-Id-Version: PACKAGE VERSION\n +Project-Id-Version: xfce4-mpc-plugin\n Report-Msgid-Bugs-To: \n POT-Creation-Date: 2012-02-15 10:14+0100\n -PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n -Last-Translator: FULL NAME EMAIL@ADDRESS\n -Language-Team: LANGUAGE l...@li.org\n +PO-Revision-Date: 2012-05-05 10:34+0100\n +Last-Translator: Ivica Kolić ik...@yahoo.com\n +Language-Team: Croatian ik...@yahoo.com\n Language: \n MIME-Version: 1.0\n -Content-Type: text/plain; charset=CHARSET\n +Content-Type: text/plain; charset=UTF-8\n Content-Transfer-Encoding: 8bit\n +Plural-Forms: nplurals=3; plural=(n%10==1 n%100!=11 ? 0 : n%10=2 n%10=4 (n%10010 || n%100=20) ? 1 : 2);\n +X-Poedit-Language: Croatian\n +X-Poedit-Country: CROATIA\n +X-Poedit-SourceCharset: utf-8\n #: ../panel-plugin/xfce4-mpc-plugin.c:128 #: ../panel-plugin/xfce4-mpc-plugin.c:204 #: ../panel-plugin/xfce4-mpc-plugin.c:749 msgid Launch -msgstr +msgstr Pokreni #: ../panel-plugin/xfce4-mpc-plugin.c:261 msgid Mpd Client Plugin @@ -29,23 +32,23 @@ msgstr #: ../panel-plugin/xfce4-mpc-plugin.c:267 msgid Properties -msgstr +msgstr Svojstva #: ../panel-plugin/xfce4-mpc-plugin.c:280 msgid Host : -msgstr +msgstr Ime računala : #: ../panel-plugin/xfce4-mpc-plugin.c:281 msgid Port : -msgstr +msgstr Port : #: ../panel-plugin/xfce4-mpc-plugin.c:282 msgid Password : -msgstr +msgstr Lozinka : #: ../panel-plugin/xfce4-mpc-plugin.c:283 msgid MPD Client : -msgstr +msgstr MPD klijent : #: ../panel-plugin/xfce4-mpc-plugin.c:284 msgid Tooltip Format : @@ -57,7 +60,7 @@ msgstr #: ../panel-plugin/xfce4-mpc-plugin.c:319 msgid Hostname or IP address -msgstr +msgstr Ime računala ili IP adresa #: ../panel-plugin/xfce4-mpc-plugin.c:320 msgid Graphical MPD Client to launch in plugin context menu @@ -65,12 +68,10 @@ msgstr #: ../panel-plugin/xfce4-mpc-plugin.c:321 msgid Variables : %artist%, %album%, %track% and %title% -msgstr +msgstr Varijable : %umjetnik%, %album%, %zapis% i %naslov% #: ../panel-plugin/xfce4-mpc-plugin.c:322 -msgid -Variables : %vol%, %status%, %newline%, %artist%, %album%, %track% and %title -% +msgid Variables : %vol%, %status%, %newline%, %artist%, %album%, %track% and %title% msgstr #: ../panel-plugin/xfce4-mpc-plugin.c:327 @@ -80,27 +81,27 @@ msgstr #: ../panel-plugin/xfce4-mpc-plugin.c:449 #: ../panel-plugin/xfce4-mpc-plugin.c:680 msgid not connected ? -msgstr +msgstr ... nije spojen? #: ../panel-plugin/xfce4-mpc-plugin.c:533 msgid Mpd playlist -msgstr +msgstr Mpd lista izvođenja #: ../panel-plugin/xfce4-mpc-plugin.c:745 msgid Random -msgstr +msgstr Nasumično #: ../panel-plugin/xfce4-mpc-plugin.c:747 msgid Repeat -msgstr +msgstr Ponovi #: ../panel-plugin/xfce4-mpc-plugin.c:752 msgid biCommands/i/b -msgstr +msgstr biNaredbe/i/b #: ../panel-plugin/xfce4-mpc-plugin.c:756 msgid biOutputs/i/b -msgstr +msgstr biIzlazi/i/b #: ../panel-plugin/xfce4-mpc-plugin.c:779 msgid A simple panel-plugin client for Music Player Daemon @@ -108,7 +109,7 @@ msgstr #: ../panel-plugin/xfce4-mpc-plugin.c:781 msgid Copyright (c) 2006-2011 Landry Breuil\n -msgstr +msgstr Autorska prava (c) 2006-2011 Landry Breuil\n #: ../panel-plugin/xfce4-mpc-plugin.desktop.in.h:1 msgid MPD Client Plugin @@ -117,3 +118,4 @@ msgstr #: ../panel-plugin/xfce4-mpc-plugin.desktop.in.h:2 msgid A client for MPD, The Music Player Daemon msgstr + ___ Xfce4-commits mailing list Xfce4-commits@xfce.org https://mail.xfce.org/mailman/listinfo/xfce4-commits
[Xfce4-commits] libxfce4ui:stephan/gtk3 Fix problem in XfceTitledDialog.
Updating branch refs/heads/stephan/gtk3 to ec23568d18ef0c1d0b9c4cc6458a887f29708162 (commit) from 11a64363e2b8525426e7dd707b88359c7129dc35 (commit) commit ec23568d18ef0c1d0b9c4cc6458a887f29708162 Author: Nick Schermer n...@xfce.org Date: Sat May 5 11:21:55 2012 +0200 Fix problem in XfceTitledDialog. You can't unset the window of a dialog. Also keep the content_area around. libxfce4ui/xfce-titled-dialog.c | 14 +++--- 1 files changed, 7 insertions(+), 7 deletions(-) diff --git a/libxfce4ui/xfce-titled-dialog.c b/libxfce4ui/xfce-titled-dialog.c index 4a865fa..096e3bd 100644 --- a/libxfce4ui/xfce-titled-dialog.c +++ b/libxfce4ui/xfce-titled-dialog.c @@ -117,15 +117,15 @@ xfce_titled_dialog_init (XfceTitledDialog *titled_dialog) { GtkWidget *line; GtkWidget *vbox; - - gtk_widget_set_has_window (GTK_WIDGET (titled_dialog), FALSE); + GtkWidget *content_area; /* connect the private data */ titled_dialog-priv = XFCE_TITLED_DIALOG_GET_PRIVATE (titled_dialog); /* remove the main dialog box from the window */ - g_object_ref (G_OBJECT (gtk_dialog_get_content_area(GTK_DIALOG (titled_dialog; - gtk_container_remove (GTK_CONTAINER (titled_dialog), gtk_dialog_get_content_area (GTK_DIALOG (titled_dialog))); + content_area = gtk_dialog_get_content_area (GTK_DIALOG (titled_dialog)); + g_object_ref (G_OBJECT (content_area)); + gtk_container_remove (GTK_CONTAINER (titled_dialog), content_area); /* add a new vbox w/o border to the main window */ vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0); @@ -143,8 +143,8 @@ xfce_titled_dialog_init (XfceTitledDialog *titled_dialog) gtk_widget_show (line); /* add the main dialog box to the new vbox */ - gtk_box_pack_start (GTK_BOX (vbox), gtk_dialog_get_content_area(GTK_DIALOG (titled_dialog)), TRUE, TRUE, 0); - g_object_unref (G_OBJECT(gtk_dialog_get_content_area(GTK_DIALOG (titled_dialog; + gtk_box_pack_start (GTK_BOX (vbox), content_area, TRUE, TRUE, 0); + g_object_unref (G_OBJECT(content_area)); /* make sure to update the heading whenever one of the relevant window properties changes */ g_signal_connect (G_OBJECT (titled_dialog), notify::icon, G_CALLBACK (xfce_titled_dialog_update_heading), NULL); @@ -218,7 +218,7 @@ xfce_titled_dialog_close (GtkDialog *dialog) GdkEvent *event; /* verify that the dialog is realized */ - if (G_LIKELY (gtk_widget_get_realized(GTK_WIDGET (dialog + if (G_LIKELY (gtk_widget_get_realized (GTK_WIDGET (dialog { /* send a delete event to the dialog */ event = gdk_event_new (GDK_DELETE); ___ Xfce4-commits mailing list Xfce4-commits@xfce.org https://mail.xfce.org/mailman/listinfo/xfce4-commits
[Xfce4-commits] xfce4-appfinder:nick/gtk3 Creating branch nick/gtk3
Updating branch refs/heads/nick/gtk3 as new branch to 08e27b7fc82cae42a46c1ff24032dfb0a5a01d64 (commit) Branches are created implicitly by pushing. This mail only exists to let you know that there was code pushed to refs/heads/nick/gtk3 for the first time. Mails for the commits that lead to the creation of the branch will follow after this mail. ___ Xfce4-commits mailing list Xfce4-commits@xfce.org https://mail.xfce.org/mailman/listinfo/xfce4-commits
[Xfce4-commits] xfce4-panel:master l10n: Updated Turkish (tr) translation to 86%
Updating branch refs/heads/master to 61fb804a6bac1c6d0c76933971a1fd2dcdcd0761 (commit) from 64c273bc5323f55ec89db58351ffc5c8455f6b7b (commit) commit 61fb804a6bac1c6d0c76933971a1fd2dcdcd0761 Author: Utku Berberoğlu utku.ber...@gmail.com Date: Sat May 5 11:42:23 2012 +0200 l10n: Updated Turkish (tr) translation to 86% New status: 336 messages complete with 51 fuzzies and 0 untranslated. Transmitted-via: Transifex (translations.xfce.org). po/tr.po | 34 +++--- 1 files changed, 19 insertions(+), 15 deletions(-) diff --git a/po/tr.po b/po/tr.po index 47555be..af67bed 100644 --- a/po/tr.po +++ b/po/tr.po @@ -11,7 +11,7 @@ msgid msgstr Project-Id-Version: xfce4-panel 4.7.0\n Report-Msgid-Bugs-To: \n -POT-Creation-Date: 2012-04-13 20:12+\n +POT-Creation-Date: 2012-05-05 06:36+\n PO-Revision-Date: 2010-05-15 00:16+0300\n Last-Translator: Ayhan YALÇINSOY ayhanyalcin...@gmail.com\n Language-Team: Turkish kde-i18n-...@kde.org,xfce-i...@xfce.org\n @@ -195,13 +195,11 @@ msgstr %s 'in hiçbir çalışan örneği bulunamadı msgid Failed to launch the migration application msgstr Göç uygulaması çalıştırılamadı -#: ../panel/panel-application.c:936 -#, fuzzy +#: ../panel/panel-application.c:953 msgid Create _Launcher -msgstr Xfce Panelinde Başlatıcı oluştur +msgstr Baş_latıcı oluştur -#: ../panel/panel-application.c:937 -#, fuzzy +#: ../panel/panel-application.c:954 msgid This will create a new launcher plugin on the panel and inserts the dropped files as menu items. @@ -209,24 +207,24 @@ msgstr Bu davranış panelde yeni bir uygulama başlatıcısı yaratacak ve sürükleyip bırakılan dosyaları menü öğesi olarak ekleyecek. -#: ../panel/panel-application.c:939 +#: ../panel/panel-application.c:956 #, c-format msgid Create new launcher from %d desktop file msgid_plural Create new launcher from %d desktop files msgstr[0] %d masaüstü dosyasından yeni bir başlatıcı yarat -#: ../panel/panel-application.c:1673 +#: ../panel/panel-application.c:1690 msgid You have started X without session manager. Clicking Quit will close the X server. msgstr Oturum yöneticisi olmadan X başlamıştır. Çık tıklamak X sunucusu kapanacak. -#: ../panel/panel-application.c:1674 +#: ../panel/panel-application.c:1691 msgid Are you sure you want to quit the panel? msgstr Paneli kapatmak istediğinizden emin misiniz? -#: ../panel/panel-application.c:1682 +#: ../panel/panel-application.c:1699 #, c-format msgid Failed to execute command \%s\ msgstr \%s\ komutu çalıştırılamadı @@ -440,7 +438,9 @@ msgstr Seçili öğeyi düzenle #, fuzzy msgid Enable compositing in the window manager for opacity settings in the panel. -msgstr Panel için şeffakflık ayarlarını görüntülemek için pencere yöneticisinde birleştirmeyi etkinleştir. +msgstr +Panel için şeffakflık ayarlarını görüntülemek için pencere yöneticisinde +birleştirmeyi etkinleştir. #: ../panel/panel-preferences-dialog.glade.h:15 #: ../plugins/actions/actions-dialog.glade.h:4 @@ -522,7 +522,10 @@ msgstr Bir Arkaplan Resmi Seç msgid Select this option if you want maximized windows to cover the area behind the panel. This only works when the panel is attached to a screen edge. -msgstr Bu seçeneği, genişletişmiş pencerenin panelin arkasındaki alanı da kaplamasını istiyorsanız seçin. Bu, sadece panel bir ekran kenarına iliştirilmişse işe yarar. +msgstr +Bu seçeneği, genişletişmiş pencerenin panelin arkasındaki alanı da +kaplamasını istiyorsanız seçin. Bu, sadece panel bir ekran kenarına +iliştirilmişse işe yarar. #: ../panel/panel-preferences-dialog.glade.h:36 msgid @@ -641,9 +644,8 @@ msgid Expert msgstr Uzman #: ../panel/panel-window.c:2390 -#, fuzzy msgid _Lock Panel -msgstr Paneli _Kilitle +msgstr Pane_li Kilitle #: ../migrate/main.c:116 msgid Welcome to the first start of the panel @@ -732,7 +734,9 @@ msgstr Oturum Menüsü #, fuzzy msgid Show a confirmation dialog with a 30 second timeout for some of the actions. -msgstr Bazı işlevler için 30 saniyelik bir gerisayımı çalıştıran doğrulama iletişim kutusu göster. +msgstr +Bazı işlevler için 30 saniyelik bir gerisayımı çalıştıran doğrulama iletişim +kutusu göster. #: ../plugins/actions/actions-dialog.glade.h:8 msgid Visible ___ Xfce4-commits mailing list Xfce4-commits@xfce.org https://mail.xfce.org/mailman/listinfo/xfce4-commits
[Xfce4-commits] xfce4-diskperf-plugin:master l10n: Updated Dutch (Flemish) (nl) translation to 100%
Updating branch refs/heads/master to 3c89727b48c4843a1d0d7cacab61d1e05fff1df2 (commit) from 59e414945ddae01cd19b2f428556d04fb5e2442e (commit) commit 3c89727b48c4843a1d0d7cacab61d1e05fff1df2 Author: Pjotr Anon pliniusmi...@gmail.com Date: Sat May 5 13:01:47 2012 +0200 l10n: Updated Dutch (Flemish) (nl) translation to 100% New status: 38 messages complete with 0 fuzzies and 0 untranslated. Transmitted-via: Transifex (translations.xfce.org). po/nl.po | 21 ++--- 1 files changed, 14 insertions(+), 7 deletions(-) diff --git a/po/nl.po b/po/nl.po index fa46554..11f7040 100644 --- a/po/nl.po +++ b/po/nl.po @@ -3,7 +3,7 @@ # This file is distributed under the same license as the # xfce4-diskperf-plugin package. # Pjotr, 2011. -# +# msgid msgstr Project-Id-Version: xfce4-diskperf-plugin\n @@ -12,10 +12,10 @@ msgstr PO-Revision-Date: 2011-09-09 11:34+0200\n Last-Translator: Pjotr\n Language-Team: Dutch (Flemish)\n -Language: nl (Dutch)\n MIME-Version: 1.0\n Content-Type: text/plain; charset=UTF-8\n Content-Transfer-Encoding: 8bit\n +Language: nl (Dutch)\n Plural-Forms: nplurals=2; plural=(n != 1);\n #: ../panel-plugin/config_gui.c:101 @@ -27,9 +27,8 @@ msgid Input the device name, then press Enter msgstr Voer de apparaatnaam in, en druk dan op Enter #: ../panel-plugin/config_gui.c:118 -#, fuzzy msgid /dev/sda1 -msgstr /dev/hda1 +msgstr /dev/sda1 #: ../panel-plugin/config_gui.c:136 msgid Data collection period @@ -64,7 +63,6 @@ msgid I/O transfer msgstr I/O-overdracht #: ../panel-plugin/config_gui.c:181 -#, fuzzy msgid MiB transferred / second msgstr MB overgebracht / seconde @@ -77,7 +75,6 @@ msgid Percentage of time the device is busy msgstr Percentage van de tijd dat het apparaat bezig is #: ../panel-plugin/config_gui.c:202 -#, fuzzy msgid Max. I/O rate (MiB/s) msgstr Max. I/O-snelheid (MB/s) @@ -139,7 +136,7 @@ msgstr 'Schrijf'-bewakingsdienst eerst #: ../panel-plugin/main.c:180 #, c-format msgid %s: Device statistics unavailable. -msgstr +msgstr %s: apparaatstatistieken niet beschikbaar. #: ../panel-plugin/main.c:219 #, c-format @@ -155,6 +152,16 @@ msgid Write : %3d\n Total : %3d msgstr +%s\n +\n +I/O(MiB/s)\n + Lezen :%3.2f\n + Schrijven :%3.2f\n + Totaal :%3.2f\n +Actieve periode (%c)\n + Lezen : %3d\n + Schrijven : %3d\n + Total : %3d #: ../panel-plugin/main.c:823 msgid Select color ___ Xfce4-commits mailing list Xfce4-commits@xfce.org https://mail.xfce.org/mailman/listinfo/xfce4-commits
[Xfce4-commits] thunar:nick/gtk3 Port to gtk3.
Updating branch refs/heads/nick/gtk3 to c0e3e85dadd1930f2c3339b6d0a6d05805790795 (commit) from 014dc8f3bddc4602ca2f813652209f36cebada53 (commit) commit c0e3e85dadd1930f2c3339b6d0a6d05805790795 Author: Nick Schermer n...@xfce.org Date: Sat May 5 13:35:10 2012 +0200 Port to gtk3. configure.in.in| 18 ++-- examples/tex-open-terminal/Makefile.am |2 + examples/tex-open-terminal/tex-open-terminal.c | 15 +--- plugins/thunar-tpa/thunar-tpa.c|5 +- thunarx/thunarx-property-page.c| 121 +++- 5 files changed, 93 insertions(+), 68 deletions(-) diff --git a/configure.in.in b/configure.in.in index aebe4f7..6f6a3be 100644 --- a/configure.in.in +++ b/configure.in.in @@ -154,14 +154,14 @@ dnl *** dnl *** Check for required packages *** dnl *** XDT_CHECK_PACKAGE([EXO], [exo-1], [0.6.0]) -XDT_CHECK_PACKAGE([GLIB], [glib-2.0], [2.24.0]) -XDT_CHECK_PACKAGE([GIO], [gio-2.0], [2.24.0]) -XDT_CHECK_PACKAGE([GTHREAD], [gthread-2.0], [2.24.0]) -XDT_CHECK_PACKAGE([GMODULE], [gmodule-2.0], [2.24.0]) -XDT_CHECK_PACKAGE([GTK], [gtk+-2.0], [2.20.0]) -XDT_CHECK_PACKAGE([GDK_PIXBUF], [gdk-pixbuf-2.0], [2.14.0]) -XDT_CHECK_PACKAGE([LIBXFCE4UTIL], [libxfce4util-1.0], [4.9.0]) -XDT_CHECK_PACKAGE([LIBXFCE4UI], [libxfce4ui-1], [4.9.0]) +XDT_CHECK_PACKAGE([GLIB], [glib-2.0], [2.30.0]) +XDT_CHECK_PACKAGE([GIO], [gio-2.0], [2.30.0]) +XDT_CHECK_PACKAGE([GTHREAD], [gthread-2.0], [2.30.0]) +XDT_CHECK_PACKAGE([GMODULE], [gmodule-2.0], [2.30.0]) +XDT_CHECK_PACKAGE([GTK], [gtk+-3.0], [3.2.0]) +XDT_CHECK_PACKAGE([GDK_PIXBUF], [gdk-pixbuf-2.0], [2.24.0]) +XDT_CHECK_PACKAGE([LIBXFCE4UTIL], [libxfce4util-1.0], [4.10.0]) +XDT_CHECK_PACKAGE([LIBXFCE4UI], [libxfce4ui-2], [4.10.0]) dnl dnl *** Check for session management support *** @@ -172,7 +172,7 @@ dnl ** dnl *** Optional GIO UNIX features *** dnl ** XDT_CHECK_OPTIONAL_PACKAGE([GIO_UNIX], [gio-unix-2.0], - [2.24.0], [gio-unix], [GIO UNIX features]) + [2.30.0], [gio-unix], [GIO UNIX features]) dnl ** dnl *** Optional support for D-BUS *** diff --git a/examples/tex-open-terminal/Makefile.am b/examples/tex-open-terminal/Makefile.am index e71996e..a8cf3ce 100644 --- a/examples/tex-open-terminal/Makefile.am +++ b/examples/tex-open-terminal/Makefile.am @@ -18,6 +18,7 @@ tex_open_terminal_la_SOURCES = \ tex_open_terminal_la_CFLAGS = \ $(GTK_CFLAGS) \ + $(LIBXFCE4UI_CFLAGS)\ $(PLATFORM_CFLAGS) tex_open_terminal_la_DEPENDENCIES =\ @@ -25,6 +26,7 @@ tex_open_terminal_la_DEPENDENCIES = \ tex_open_terminal_la_LIBADD = \ $(top_builddir)/thunarx/libthunarx-$(THUNARX_VERSION_API).la\ + $(LIBXFCE4UI_LIBS) \ $(GTK_LIBS) tex_open_terminal_la_LDFLAGS = \ diff --git a/examples/tex-open-terminal/tex-open-terminal.c b/examples/tex-open-terminal/tex-open-terminal.c index 331b70f..297ab9b 100644 --- a/examples/tex-open-terminal/tex-open-terminal.c +++ b/examples/tex-open-terminal/tex-open-terminal.c @@ -29,6 +29,7 @@ #include string.h #endif +#include libxfce4ui/libxfce4ui.h #include tex-open-terminal/tex-open-terminal.h @@ -143,7 +144,6 @@ tex_open_terminal_activated (GtkAction *action, GtkWidget *window) { const gchar *path; - GtkWidget *dialog; GError *error = NULL; gchar *command; @@ -156,18 +156,9 @@ tex_open_terminal_activated (GtkAction *action, command = g_strdup_printf (Terminal --working-directory \%s\, path); /* try to run the terminal command */ - if (!gdk_spawn_command_line_on_screen (gtk_widget_get_screen (window), command, error)) + if (!xfce_spawn_command_line_on_screen (gtk_widget_get_screen (window), command, FALSE, FALSE, error)) { - /* display an error dialog */ - dialog = gtk_message_dialog_new (GTK_WINDOW (window), - GTK_DIALOG_DESTROY_WITH_PARENT, - GTK_MESSAGE_ERROR, - GTK_BUTTONS_CLOSE, - Failed to open terminal in folder %s., - path); - gtk_message_dialog_format_secondary_text (GTK_MESSAGE_DIALOG (dialog), %s., error-message); - gtk_dialog_run (GTK_DIALOG (dialog)); -
[Xfce4-commits] exo:stephan/gtk3 Creating branch stephan/gtk3
Updating branch refs/heads/stephan/gtk3 as new branch to f0c30b9f29b953c26cfbf20c82e811034068da55 (commit) Branches are created implicitly by pushing. This mail only exists to let you know that there was code pushed to refs/heads/stephan/gtk3 for the first time. Mails for the commits that lead to the creation of the branch will follow after this mail. ___ Xfce4-commits mailing list Xfce4-commits@xfce.org https://mail.xfce.org/mailman/listinfo/xfce4-commits
[Xfce4-commits] exo:stephan/gtk3 Bump dependencies and version number
Updating branch refs/heads/stephan/gtk3 to f0c30b9f29b953c26cfbf20c82e811034068da55 (commit) from 39e085f04f07af3d79a8f167b367165b1422842a (commit) commit f0c30b9f29b953c26cfbf20c82e811034068da55 Author: Stephan Arts step...@xfce.org Date: Sat May 5 13:35:28 2012 +0200 Bump dependencies and version number configure.in.in | 45 - 1 files changed, 8 insertions(+), 37 deletions(-) diff --git a/configure.in.in b/configure.in.in index 90f0473..0c8d1e3 100644 --- a/configure.in.in +++ b/configure.in.in @@ -9,9 +9,9 @@ dnl *** dnl *** Version information *** dnl *** m4_define([libexo_verinfo], [0:0:0]) -m4_define([libexo_version_api], [1]) +m4_define([libexo_version_api], [2]) m4_define([libexo_version_major], [0]) -m4_define([libexo_version_minor], [8]) +m4_define([libexo_version_minor], [9]) m4_define([libexo_version_micro], [0]) m4_define([libexo_version_nano], []) m4_define([libexo_version_build], [@REVISION@]) @@ -157,41 +157,12 @@ XDT_I18N([@LINGUAS@], [exo-libexo_version_api()]) dnl *** dnl *** Check for required packages *** dnl *** -XDT_CHECK_PACKAGE([GLIB], [glib-2.0], [2.24.0]) -XDT_CHECK_PACKAGE([GIO], [gio-2.0], [2.24.0]) -XDT_CHECK_PACKAGE([GTK], [gtk+-2.0], [2.20.0]) -XDT_CHECK_PACKAGE([GTHREAD], [gthread-2.0], [2.24.0]) -XDT_CHECK_PACKAGE([LIBXFCE4UTIL], [libxfce4util-1.0], [4.9.0]) -XDT_CHECK_PACKAGE([LIBXFCE4UI], [libxfce4ui-1], [4.9.0]) - -dnl *** -dnl *** Check if we need to build the GIO module (optional) *** -dnl *** -XDT_CHECK_OPTIONAL_PACKAGE([GIO_UNIX], [gio-unix-2.0], [2.18.0], [gio-unix], [GIO-Unix features], [yes]) -GIOMODULEDIR= -BUILD_GIOMODULE= -if test x$GIO_UNIX_FOUND = xyes; then - if $PKG_CONFIG --atleast-version=2.27.0 gio-unix-2.0 /dev/null 21; then -BUILD_GIOMODULE=no - else -dnl A GIO version = 2.18 and 2.27 was found -BUILD_GIOMODULE=yes - -dnl GIO directory for extensions -AC_ARG_WITH([gio-module-dir], -[AC_HELP_STRING([--with-gio-module-dir=PATH], -[Specify where to install the exo gio module (default=autodetect)])], -[gio_module_dir=$withval]) -if test x$gio_module_dir = x; then - GIOMODULEDIR=`$PKG_CONFIG gio-2.0 --variable giomoduledir` -elif test x$gio_module_dir != xdistcheck; then - GIOMODULEDIR=$gio_module_dir -fi - fi -fi -AC_SUBST([GIOMODULEDIR]) -AM_CONDITIONAL([HAVE_GIOMODULEDIR], [test x$GIOMODULEDIR != x]) -AM_CONDITIONAL([BUILD_GIOMODULE], [test x$BUILD_GIOMODULE = xyes]) +XDT_CHECK_PACKAGE([GLIB], [glib-2.0], [2.30.0]) +XDT_CHECK_PACKAGE([GIO], [gio-2.0], [2.30.0]) +XDT_CHECK_PACKAGE([GTK], [gtk+-3.0], [3.2.0]) +XDT_CHECK_PACKAGE([GTHREAD], [gthread-2.0], [2.30.0]) +XDT_CHECK_PACKAGE([LIBXFCE4UTIL], [libxfce4util-1.0], [4.10.0]) +XDT_CHECK_PACKAGE([LIBXFCE4UI], [libxfce4ui-1], [4.10.0]) dnl * dnl *** Check for X11 *** ___ Xfce4-commits mailing list Xfce4-commits@xfce.org https://mail.xfce.org/mailman/listinfo/xfce4-commits
[Xfce4-commits] thunar:nick/gtk3 Simpler extraction of uri list.
Updating branch refs/heads/nick/gtk3 to 69b1ff421a5d348cff60967482a0d9d9a6d6f953 (commit) from c0e3e85dadd1930f2c3339b6d0a6d05805790795 (commit) commit 69b1ff421a5d348cff60967482a0d9d9a6d6f953 Author: Nick Schermer n...@xfce.org Date: Sat May 5 13:43:45 2012 +0200 Simpler extraction of uri list. Gtk validates the selection data, so don't do that twice. plugins/thunar-tpa/thunar-tpa.c |6 ++ 1 files changed, 2 insertions(+), 4 deletions(-) diff --git a/plugins/thunar-tpa/thunar-tpa.c b/plugins/thunar-tpa/thunar-tpa.c index 5905dfc..afb02c1 100644 --- a/plugins/thunar-tpa/thunar-tpa.c +++ b/plugins/thunar-tpa/thunar-tpa.c @@ -441,11 +441,9 @@ thunar_tpa_drag_data_received (GtkWidget*button, if (G_LIKELY (info == TARGET_TEXT_URI_LIST)) { /* check if the data is valid for text/uri-list */ - if (G_LIKELY (gtk_selection_data_get_length (selection_data) = 0 - gtk_selection_data_get_format (selection_data) == 8)) + uri_list = gtk_selection_data_get_uris (selection_data); + if (G_LIKELY (uri_list != NULL)) { - /* parse the URI list according to RFC 2483 */ - uri_list = gtk_selection_data_get_uris (selection_data); succeed = thunar_tpa_move_to_trash (plugin, (const gchar **) uri_list); g_strfreev (uri_list); } ___ Xfce4-commits mailing list Xfce4-commits@xfce.org https://mail.xfce.org/mailman/listinfo/xfce4-commits
[Xfce4-commits] eatmonkey:aria2-xml-rpc l10n: Added Lithuanian language
Updating branch refs/heads/aria2-xml-rpc to b0b3130ca411e2b689bdbaf8ebda70d1bdf90910 (commit) from c65602d961f8e76ed41d98170b10b82392ae0e43 (commit) commit b0b3130ca411e2b689bdbaf8ebda70d1bdf90910 Author: Algimantas Margevičius margevicius.algiman...@gmail.com Date: Sat May 5 14:47:29 2012 +0200 l10n: Added Lithuanian language New status: 52 messages complete with 0 fuzzies and 0 untranslated. Transmitted-via: Transifex (translations.xfce.org). po/{el.po = lt.po} | 131 ++ 1 files changed, 58 insertions(+), 73 deletions(-) diff --git a/po/el.po b/po/lt.po similarity index 62% copy from po/el.po copy to po/lt.po index e095158..90ad9ba 100644 --- a/po/el.po +++ b/po/lt.po @@ -2,26 +2,25 @@ # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER # This file is distributed under the same license as the PACKAGE package. # FIRST AUTHOR EMAIL@ADDRESS, YEAR. +# Algimantas Margevičius margevicius.algiman...@gmail.com, 2012. # msgid msgstr -Project-Id-Version: eatmonkey git version\n +Project-Id-Version: eatmonkey\n Report-Msgid-Bugs-To: \n POT-Creation-Date: 2010-02-28 22:18+0100\n -PO-Revision-Date: 2010-01-29 22:47+0200\n -Last-Translator: Evaggelos Balaskas ebalas...@ebalaskas.gr\n -Language-Team: Greek n...@tux.hellug.gr\n +PO-Revision-Date: 2012-05-05 15:38+0300\n +Last-Translator: Algimantas Margevičius margevicius.algiman...@gmail.com\n +Language-Team: Lietuvių \n MIME-Version: 1.0\n -Content-Type: text/plain; charset=utf-8\n +Content-Type: text/plain; charset=UTF-8\n Content-Transfer-Encoding: 8bit\n -Plural-Forms: nplurals=2; plural=(n != 1);\n -X-Poedit-Language: Greek\n -X-Poedit-Country: GREECE\n -X-Poedit-SourceCharset: utf-8\n +Plural-Forms: nplurals=3; plural=(n%10==1 n%100!=11 ? 0 : n%10=2 (n +%10010 || n%100=20) ? 1 : 2)\n #: ../eatmonkey.desktop.in.h:1 msgid Download Manager -msgstr Διαχειριστής μεταφορών +msgstr Atsiuntimų tvarkyklė #: ../eatmonkey.desktop.in.h:2 ../src/manager.ui.h:6 msgid Eatmonkey @@ -29,117 +28,111 @@ msgstr Eatmonkey #: ../src/manager.ui.h:1 ../src/settings.ui.h:1 msgid (0=infinite) -msgstr (0=άπειρο) +msgstr (0=neribota) #: ../src/manager.ui.h:2 msgid Add new download from URI or File -msgstr +msgstr Pridėti naują parsiuntimą iš URI ar failo #: ../src/manager.ui.h:3 ../src/settings.ui.h:11 msgid Download Options -msgstr Επιλογές μεταφορών +msgstr Parsiuntimo parinktys #: ../src/manager.ui.h:4 ../src/settings.ui.h:12 msgid Download directory: -msgstr Κατάλογος μεταφορών: +msgstr Parsiuntimo aplankas #: ../src/manager.ui.h:5 msgid E_dit -msgstr Ε_πεξεργασία +msgstr _Keisti #: ../src/manager.ui.h:7 msgid H_elp -msgstr Β_οήθεια +msgstr Ž_inynas #: ../src/manager.ui.h:8 ../src/settings.ui.h:18 msgid KiB/s -msgstr KiB/s +msgstr KB/s #: ../src/manager.ui.h:9 ../src/settings.ui.h:21 msgid Maximum download speed: -msgstr Μέγιστη ταχύτητα μεταφοράς: +msgstr Didžiausias atsiuntimo greitis: #: ../src/manager.ui.h:10 ../src/settings.ui.h:24 msgid Maximum upload speed: -msgstr Μέγιστη ταχύτητα αποστολής: +msgstr Didžiausias išsiuntimo greitis: #: ../src/manager.ui.h:11 -#, fuzzy msgid New Download -msgstr Νέα μεταφορά +msgstr Naujas atsisiuntimas #: ../src/manager.ui.h:12 ../src/settings.ui.h:27 msgid Number of fragmentation: -msgstr +msgstr Fragmentų skaičius: #: ../src/manager.ui.h:13 -#, fuzzy msgid Select a file - Torrent or Metalink -msgstr Επιλογή αρχείου - Torrents, Metalinks +msgstr Pasirinkite failą - Torrent ar Metalink #: ../src/manager.ui.h:14 msgid Select from clipboard -msgstr Επιλογή από πρόχειρο +msgstr Iš iškarpinės #: ../src/manager.ui.h:15 ../src/settings.ui.h:34 -#, fuzzy msgid Share ratio: -msgstr Λόγος γόνων: +msgstr Dalinimosi santykis: #: ../src/manager.ui.h:16 msgid These options only apply for BitTorrent -msgstr +msgstr Šie nustatymai taikomi tik BitTorrent #: ../src/manager.ui.h:17 -#, fuzzy msgid Upload Options -msgstr Επιλογές μεταφορών +msgstr Išsiuntimo parinktys #: ../src/manager.ui.h:18 msgid _Compact View -msgstr _Προβολή λίστας +msgstr _Glaustasis rodinys #: ../src/manager.ui.h:19 -#, fuzzy msgid _Detailed View -msgstr _Προβολή λεπτομερειών +msgstr _Išsamus rodinys #: ../src/manager.ui.h:20 msgid _File -msgstr _Αρχείο +msgstr _Failas #: ../src/manager.ui.h:21 msgid _History -msgstr _Ιστορικό +msgstr _Istorija #: ../src/manager.ui.h:22 msgid _Log -msgstr _Καταγραφή +msgstr Ž_urnalas #: ../src/manager.ui.h:23 msgid _View -msgstr _Προβολή +msgstr R_odymas #: ../src/settings.ui.h:2 msgid Advanced -msgstr +msgstr Papildomi #: ../src/settings.ui.h:3 -#, fuzzy msgid Advanced Download Options -msgstr Επιλογές μεταφορών +msgstr Papildomos parsiuntimo parinktys #: ../src/settings.ui.h:4 msgid Always require encryption -msgstr Απαιτείται αυθεντικοποίηση πάντα +msgstr Visada naudoti šifravimą #: ../src/settings.ui.h:5 msgid Authentication -msgstr
[Xfce4-commits] xfce4-diskperf-plugin:master l10n: Updated Lithuanian (lt) translation to 100%
Updating branch refs/heads/master to 7fec56a9c1167968f2dee282906af6e70bc56e4b (commit) from 3c89727b48c4843a1d0d7cacab61d1e05fff1df2 (commit) commit 7fec56a9c1167968f2dee282906af6e70bc56e4b Author: Algimantas Margevičius margevicius.algiman...@gmail.com Date: Sat May 5 14:50:13 2012 +0200 l10n: Updated Lithuanian (lt) translation to 100% New status: 38 messages complete with 0 fuzzies and 0 untranslated. Transmitted-via: Transifex (translations.xfce.org). po/lt.po | 26 +- 1 files changed, 17 insertions(+), 9 deletions(-) diff --git a/po/lt.po b/po/lt.po index 46e16ca..571d940 100644 --- a/po/lt.po +++ b/po/lt.po @@ -3,7 +3,7 @@ # This file is distributed under the same license as the PACKAGE package. # FIRST AUTHOR EMAIL@ADDRESS, YEAR. # Algimantas Margevičius margevicius.algiman...@gmail.com, 2012. -# +# msgid msgstr Project-Id-Version: disk perf\n @@ -12,12 +12,11 @@ msgstr PO-Revision-Date: 2012-04-21 13:00+0300\n Last-Translator: Algimantas Margevičius margevicius.algiman...@gmail.com\n Language-Team: Lietuvių \n -Language: \n MIME-Version: 1.0\n Content-Type: text/plain; charset=UTF-8\n Content-Transfer-Encoding: 8bit\n -Plural-Forms: nplurals=3; plural=(n%10==1 n%100!=11 ? 0 : n%10=2 (n -%10010 || n%100=20) ? 1 : 2)\n +Language: \n +Plural-Forms: nplurals=3; plural=(n%10==1 n%100!=11 ? 0 : n%10=2 (n%10010 || n%100=20) ? 1 : 2)\n #: ../panel-plugin/config_gui.c:101 msgid Device @@ -28,9 +27,8 @@ msgid Input the device name, then press Enter msgstr Įrašykite įrenginio vardą ir paspauskite Enter #: ../panel-plugin/config_gui.c:118 -#, fuzzy msgid /dev/sda1 -msgstr /dev/hda1 +msgstr /dev/sda1 #: ../panel-plugin/config_gui.c:136 msgid Data collection period @@ -65,7 +63,6 @@ msgid I/O transfer msgstr I/O perdavimas #: ../panel-plugin/config_gui.c:181 -#, fuzzy msgid MiB transferred / second msgstr perduota MB / per sekundę @@ -78,7 +75,6 @@ msgid Percentage of time the device is busy msgstr Kiek laiko(procentais) įrenginys užimtas #: ../panel-plugin/config_gui.c:202 -#, fuzzy msgid Max. I/O rate (MiB/s) msgstr Didž. I/O santykis (MB/s) @@ -140,7 +136,7 @@ msgstr Pirmiausia „Rašymo“ stebyklė #: ../panel-plugin/main.c:180 #, c-format msgid %s: Device statistics unavailable. -msgstr +msgstr %s: Įrenginio statistika neprieinama #: ../panel-plugin/main.c:219 #, c-format @@ -156,6 +152,18 @@ msgid Write : %3d\n Total : %3d msgstr +\t\r\n +\r\n +%s\n +\n +I/O (MB/s)\n + Skaitymas :%3.2f\n + Rašymas :%3.2f\n + Viso :%3.2f\n +Užimtumo laikas (%c)\n + Skaitymas : %3d\n + Rašymas : %3d\n + Viso : %3d #: ../panel-plugin/main.c:823 msgid Select color ___ Xfce4-commits mailing list Xfce4-commits@xfce.org https://mail.xfce.org/mailman/listinfo/xfce4-commits
[Xfce4-commits] exo:stephan/gtk3 Port exo-cell-renderer-ellipsized-text
Updating branch refs/heads/stephan/gtk3 to f7cc8b5f39b6f9c936e81ee3f2553669f027a3a0 (commit) from f0c30b9f29b953c26cfbf20c82e811034068da55 (commit) commit f7cc8b5f39b6f9c936e81ee3f2553669f027a3a0 Author: Stephan Arts step...@xfce.org Date: Sat May 5 14:52:42 2012 +0200 Port exo-cell-renderer-ellipsized-text exo/exo-cell-renderer-ellipsized-text.c | 63 +- exo/exo-gtk-extensions.c|8 ++-- exo/exo-gtk-extensions.h|2 +- exo/exo-icon-bar.c | 10 ++-- exo/exo-icon-view.c | 26 ++-- exo/exo-icon-view.h |2 +- exo/exo-toolbars-view.c |2 +- 7 files changed, 61 insertions(+), 52 deletions(-) diff --git a/exo/exo-cell-renderer-ellipsized-text.c b/exo/exo-cell-renderer-ellipsized-text.c index 5836221..4da148f 100644 --- a/exo/exo-cell-renderer-ellipsized-text.c +++ b/exo/exo-cell-renderer-ellipsized-text.c @@ -70,17 +70,16 @@ static void exo_cell_renderer_ellipsized_text_set_property (GObject GParamSpec *pspec); static void exo_cell_renderer_ellipsized_text_get_size (GtkCellRenderer *renderer, GtkWidget *widget, - GdkRectangle *cell_area, + const GdkRectangle *cell_area, gint *x_offset, gint *y_offset, gint *width, gint *height); static void exo_cell_renderer_ellipsized_text_render(GtkCellRenderer *renderer, - GdkWindow *window, + cairo_t *cr, GtkWidget *widget, - GdkRectangle *background_area, - GdkRectangle *cell_area, - GdkRectangle *expose_area, + const GdkRectangle *background_area, + const GdkRectangle *cell_area, GtkCellRendererStateflags); @@ -188,19 +187,20 @@ exo_cell_renderer_ellipsized_text_set_property (GObject *object, static void -exo_cell_renderer_ellipsized_text_get_size (GtkCellRenderer *renderer, -GtkWidget *widget, -GdkRectangle*cell_area, -gint*x_offset, -gint*y_offset, -gint*width, -gint*height) +exo_cell_renderer_ellipsized_text_get_size (GtkCellRenderer*renderer, +GtkWidget *widget, +const GdkRectangle *cell_area, +gint *x_offset, +gint *y_offset, +gint *width, +gint *height) { ExoCellRendererEllipsizedTextPrivate *priv = EXO_CELL_RENDERER_ELLIPSIZED_TEXT_GET_PRIVATE (renderer); gint focus_line_width; gint focus_padding; gint text_height; gint text_width; + GdkRectangle aligned_area; /* determine the dimensions of the text from the GtkCellRendererText */ (*GTK_CELL_RENDERER_CLASS (exo_cell_renderer_ellipsized_text_parent_class)-get_size) (renderer, widget, NULL, NULL, NULL, text_width, text_height); @@ -227,16 +227,21 @@ exo_cell_renderer_ellipsized_text_get_size (GtkCellRenderer
[Xfce4-commits] exo:stephan/gtk3 Partially port ExoCellRendererIcon
Updating branch refs/heads/stephan/gtk3 to df1bce813f1c730c27b516d551cd928aa781d903 (commit) from f7cc8b5f39b6f9c936e81ee3f2553669f027a3a0 (commit) commit df1bce813f1c730c27b516d551cd928aa781d903 Author: Stephan Arts step...@xfce.org Date: Sat May 5 16:13:32 2012 +0200 Partially port ExoCellRendererIcon exo/exo-cell-renderer-icon.c | 58 -- 1 files changed, 33 insertions(+), 25 deletions(-) diff --git a/exo/exo-cell-renderer-icon.c b/exo/exo-cell-renderer-icon.c index 0e6ead7..e79da86 100644 --- a/exo/exo-cell-renderer-icon.c +++ b/exo/exo-cell-renderer-icon.c @@ -78,17 +78,16 @@ static void exo_cell_renderer_icon_set_property (GObject *objec GParamSpec *pspec); static void exo_cell_renderer_icon_get_size (GtkCellRenderer *renderer, GtkWidget *widget, - GdkRectangle *cell_area, + const GdkRectangle *cell_area, gint *x_offset, gint *y_offset, gint *width, gint *height); static void exo_cell_renderer_icon_render (GtkCellRenderer *renderer, - GdkWindow *window, + cairo_t *cr, GtkWidget *widget, - GdkRectangle *background_area, - GdkRectangle *cell_area, - GdkRectangle *expose_area, + const GdkRectangle *background_area, + const GdkRectangle *cell_area, GtkCellRendererState flags); @@ -316,29 +315,39 @@ exo_cell_renderer_icon_set_property (GObject *object, static void -exo_cell_renderer_icon_get_size (GtkCellRenderer *renderer, - GtkWidget *widget, - GdkRectangle*cell_area, - gint*x_offset, - gint*y_offset, - gint*width, - gint*height) +exo_cell_renderer_icon_get_size (GtkCellRenderer *renderer, + GtkWidget *widget, + const GdkRectangle*cell_area, + gint *x_offset, + gint *y_offset, + gint *width, + gint *height) { const ExoCellRendererIconPrivate *priv = EXO_CELL_RENDERER_ICON_GET_PRIVATE (renderer); + GdkRectangle aligned_area; + gint xpad; + gint ypad; + + gtk_cell_renderer_get_padding (renderer, xpad, ypad); if (cell_area != NULL) { + gtk_cell_renderer_get_aligned_area (renderer, + widget, + 0, + cell_area, + aligned_area); if (x_offset != NULL) { - *x_offset = ((gtk_widget_get_direction (widget) == GTK_TEXT_DIR_RTL) ? 1.0 - renderer-xalign : renderer-xalign) + *x_offset = ((gtk_widget_get_direction (widget) == GTK_TEXT_DIR_RTL) ? 1.0 - aligned_area.x: aligned_area.x) * (cell_area-width - priv-size); - *x_offset = MAX (*x_offset, 0) + renderer-xpad; + *x_offset = MAX (*x_offset, 0) + xpad; } if (y_offset != NULL) { - *y_offset = renderer-yalign * (cell_area-height - priv-size); - *y_offset = MAX (*y_offset, 0) + renderer-ypad; + *y_offset = aligned_area.y * (cell_area-height - priv-size); + *y_offset = MAX (*y_offset, 0) + ypad; } } else @@ -351,21 +360,20 @@ exo_cell_renderer_icon_get_size (GtkCellRenderer *renderer, } if (G_LIKELY (width != NULL)) -*width = (gint) renderer-xpad * 2 + priv-size; +*width = (gint) xpad * 2 + priv-size; if (G_LIKELY (height !=
[Xfce4-commits] xfce4-dict:master Fix panel plugin build
Updating branch refs/heads/master to 68c07f6e6965740dc4fb3717fede8962f299aa45 (commit) from 509f8c0e2878a9ac169fe84b75dbfb3004b0b319 (commit) commit 68c07f6e6965740dc4fb3717fede8962f299aa45 Author: Enrico Tröger enrico.troe...@uvena.de Date: Sat May 5 18:41:05 2012 +0200 Fix panel plugin build - Don't use a versioned library. - Build as a module. - Only export needed symbols. (shamelessly copied from xfce4-screenshooter, thanks Samuli and Jérôme) panel-plugin/Makefile.am |7 +++ 1 files changed, 7 insertions(+), 0 deletions(-) diff --git a/panel-plugin/Makefile.am b/panel-plugin/Makefile.am index 0eac716..452cd2c 100644 --- a/panel-plugin/Makefile.am +++ b/panel-plugin/Makefile.am @@ -15,6 +15,13 @@ libxfce4dict_la_CFLAGS = \ -DPACKAGE_LOCALE_DIR=\$(localedir)\ \ @GTHREAD_CFLAGS@ +libxfce4dict_la_LDFLAGS = \ + -avoid-version \ + -module \ + -no-undefined \ + -export-symbols-regex '^xfce_panel_module_(preinit|init|construct)' \ + $(PLATFORM_LDFLAGS) + libxfce4dict_la_LIBADD = \ $(LIBXFCE4PANEL_LIBS) \ $(LIBXFCE4UI_LIBS) \ ___ Xfce4-commits mailing list Xfce4-commits@xfce.org https://mail.xfce.org/mailman/listinfo/xfce4-commits
[Xfce4-commits] exo:stephan/gtk3 use correct 4ui library.
Updating branch refs/heads/stephan/gtk3 to 939d11425642cab7c6222de31c2dda2e731664ac (commit) from df1bce813f1c730c27b516d551cd928aa781d903 (commit) commit 939d11425642cab7c6222de31c2dda2e731664ac Author: Nick Schermer n...@xfce.org Date: Sat May 5 16:25:20 2012 +0200 use correct 4ui library. configure.in.in |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/configure.in.in b/configure.in.in index 0c8d1e3..ab56027 100644 --- a/configure.in.in +++ b/configure.in.in @@ -162,7 +162,7 @@ XDT_CHECK_PACKAGE([GIO], [gio-2.0], [2.30.0]) XDT_CHECK_PACKAGE([GTK], [gtk+-3.0], [3.2.0]) XDT_CHECK_PACKAGE([GTHREAD], [gthread-2.0], [2.30.0]) XDT_CHECK_PACKAGE([LIBXFCE4UTIL], [libxfce4util-1.0], [4.10.0]) -XDT_CHECK_PACKAGE([LIBXFCE4UI], [libxfce4ui-1], [4.10.0]) +XDT_CHECK_PACKAGE([LIBXFCE4UI], [libxfce4ui-2], [4.10.0]) dnl * dnl *** Check for X11 *** ___ Xfce4-commits mailing list Xfce4-commits@xfce.org https://mail.xfce.org/mailman/listinfo/xfce4-commits
[Xfce4-commits] exo:stephan/gtk3 Remove the exo-gio-modules.
Updating branch refs/heads/stephan/gtk3 to 34b853c61739c2c626020b80cb0db4307e74fb38 (commit) from 939d11425642cab7c6222de31c2dda2e731664ac (commit) commit 34b853c61739c2c626020b80cb0db4307e74fb38 Author: Nick Schermer n...@xfce.org Date: Sat May 5 16:28:10 2012 +0200 Remove the exo-gio-modules. Not required now we always use glib = 2.30. Makefile.am |5 +- configure.in.in |9 -- exo-gio-module/Makefile.am | 50 --- exo-gio-module/exo-module.c | 198 --- 4 files changed, 1 insertions(+), 261 deletions(-) diff --git a/Makefile.am b/Makefile.am index 0ab3853..572e111 100644 --- a/Makefile.am +++ b/Makefile.am @@ -2,7 +2,6 @@ SUBDIRS = \ exo \ exo-csource \ exo-desktop-item-edit \ - exo-gio-module \ exo-helper \ exo-open\ docs\ @@ -52,8 +51,6 @@ DISTCLEANFILES = \ intltool-update DISTCHECK_CONFIGURE_FLAGS =\ - --enable-gtk-doc\ - --enable-gen-doc\ - --with-gio-module-dir=distcheck + --enable-gtk-doc # vi:set ts=8 sw=8 noet ai nocindent: diff --git a/configure.in.in b/configure.in.in index ab56027..acea09f 100644 --- a/configure.in.in +++ b/configure.in.in @@ -234,7 +234,6 @@ exo/exo-1.pc exo/exo-config.h exo-csource/Makefile exo-desktop-item-edit/Makefile -exo-gio-module/Makefile exo-helper/Makefile exo-helper/helpers/Makefile exo-open/Makefile @@ -253,14 +252,6 @@ dnl *** echo echo Build Configuration: echo -if test x$BUILD_GIOMODULE = xno; then -echo * Build GIO module: no (not needed after glib 2.27) -elif test x$GIO_UNIX_FOUND = xyes; then -echo * Build GIO module: yes -echo - GIO Module Dir: $GIOMODULEDIR -else -echo * Build GIO module: no -fi echo * Debug Support:$enable_debug echo * GNU Visibility: $have_gnuc_visibility echo diff --git a/exo-gio-module/Makefile.am b/exo-gio-module/Makefile.am deleted file mode 100644 index b0a9946..000 --- a/exo-gio-module/Makefile.am +++ /dev/null @@ -1,50 +0,0 @@ - -INCLUDES = \ - -I$(top_srcdir) \ - -DG_LOG_DOMAIN=\exo-gio-module\ \ - -DHELPERDIR=\$(HELPER_PATH_PREFIX)/xfce4/exo-$(LIBEXO_VERSION_API)\ \ - -DPACKAGE_LOCALE_DIR=\$(localedir)\ \ - -DLIBEXO_VERSION_API=\$(LIBEXO_VERSION_API)\ - -if BUILD_GIOMODULE - -if HAVE_GIOMODULEDIR -exomoduledir = \ - $(GIOMODULEDIR) -else -exomoduledir = \ - $(libdir)/gio/modules -endif - -exomodule_LTLIBRARIES = \ - libexo-module-1.la - -libexo_module_1_la_SOURCES = \ - exo-module.c - -libexo_module_1_la_CFLAGS =\ - $(GIO_CFLAGS) \ - $(GIO_UNIX_CFLAGS) \ - $(GTK_CFLAGS) \ - $(LIBXFCE4UTIL_CFLAGS) - -libexo_module_1_la_LDFLAGS = \ - -export_dynamic \ - -avoid-version \ - -module \ - -no-undefined \ - -export-symbols-regex '^g_io_module_(load|unload|query)' - -libexo_module_1_la_DEPENDENCIES = \ - $(top_builddir)/exo/libexo-$(LIBEXO_VERSION_API).la - -libexo_module_1_la_LIBADD =\ - $(GIO_LIBS) \ - $(GIO_UNIX_LIBS) \ - $(GTK_LIBS) \ - $(LIBXFCE4UTIL_LIBS)\ - $(top_builddir)/exo/libexo-$(LIBEXO_VERSION_API).la - -endif - -# vi:set ts=8 sw=8 noet ai nocindent syntax=automake: diff --git a/exo-gio-module/exo-module.c
[Xfce4-commits] mousepad:master for nick
Updating branch refs/heads/master to 1bd002d711d108435b12b0cf7aa694b908cd63ed (commit) from 1bd002d711d108435b12b0cf7aa694b908cd63ed^1 () ___ Xfce4-commits mailing list Xfce4-commits@xfce.org https://mail.xfce.org/mailman/listinfo/xfce4-commits
[Xfce4-commits] mousepad:master * TODO, NEWS: Update the current status of the rewrite. * Mousepad.desktop.in.in: Add MimeType and improve Categories. * Initial import of my Mousepad rewrite.
Updating branch refs/heads/master to 62dbff28f0cd78e96933a78c979ef3109a5a43ba (commit) from 8a402ec2206b15649d4bc1a50621d3a52f11dd2b (commit) commit 62dbff28f0cd78e96933a78c979ef3109a5a43ba Author: Nick Schermer n...@xfce.org Date: Tue Feb 27 17:20:46 2007 + * TODO, NEWS: Update the current status of the rewrite. * Mousepad.desktop.in.in: Add MimeType and improve Categories. * Initial import of my Mousepad rewrite. (Old svn revision: 25037) ChangeLog |8 Mousepad.desktop.in.in |4 ++-- NEWS |2 +- TODO |6 +++--- 4 files changed, 14 insertions(+), 6 deletions(-) diff --git a/ChangeLog b/ChangeLog index e69de29..93808dc 100644 --- a/ChangeLog +++ b/ChangeLog @@ -0,0 +1,8 @@ +2007-02-17 Nick Schermer n...@xfce.org + + * TODO, NEWS: Update the current status of the rewrite. + * Mousepad.desktop.in.in: Add MimeType and improve Categories. + +2007-02-17 Nick Schermer n...@xfce.org + + * Initial import of my Mousepad rewrite. diff --git a/Mousepad.desktop.in.in b/Mousepad.desktop.in.in index 875f1b7..e7ae985 100644 --- a/Mousepad.desktop.in.in +++ b/Mousepad.desktop.in.in @@ -9,5 +9,5 @@ Icon=Mousepad Terminal=false StartupNotify=true Type=Application -Categories=Application;Office; - +Categories=Application;Utility;TextEditor;GTK; +MimeType=text/plain diff --git a/NEWS b/NEWS index 4109058..76ba3a4 100644 --- a/NEWS +++ b/NEWS @@ -26,4 +26,4 @@ Bug that can be closed: Bug that won't be fixed: 956 - Xfce About dialog. This allows us to depend on libxfcegui4 for one - dialog, so we're going to do that and use the Gtk about dialog. + dialog, so we're not going to do that and use the Gtk about dialog. diff --git a/TODO b/TODO index a6464bb..da149dc 100644 --- a/TODO +++ b/TODO @@ -1,10 +1,10 @@ - Interface - - Implement the Go menu and acceleartors. - Dialog when closing multiple (modified) tabs. - Statusbar (not a priority). - Right-click menu for the tab label. - - Credits dialog. - Change tabs position. + - Tab font color when the file is modified or readonly. + - Clear the recent history. - Text View - Search and Replace. Maybe also text highlighting. @@ -18,7 +18,7 @@ - Other - Implement Gtk print support. - - Maybe add support for gtksourceview and/or gtkspell. + - Maybe add support for gtksourceview and/or gtkspell (not a priority). - Testing - Profiling the startup time. ___ Xfce4-commits mailing list Xfce4-commits@xfce.org https://mail.xfce.org/mailman/listinfo/xfce4-commits
[Xfce4-commits] mousepad:master * TODO: Remind myself to fix problems with UTF-8 filenames. * mousepad/mousepad-window.c: Fix crash when opening files with the command line. * Mousepad.desktop.in.in
Updating branch refs/heads/master to ff28ae1045a381c7dc815906b9a0816b87451e2b (commit) from 62dbff28f0cd78e96933a78c979ef3109a5a43ba (commit) commit ff28ae1045a381c7dc815906b9a0816b87451e2b Author: Nick Schermer n...@xfce.org Date: Tue Feb 27 21:28:04 2007 + * TODO: Remind myself to fix problems with UTF-8 filenames. * mousepad/mousepad-window.c: Fix crash when opening files with the command line. * Mousepad.desktop.in.in, Mousepad.desktop.in.in: Mousepad executable is now lowercase again. * mousepad/mousepad-screen.c: Remove unused signals from the Class. (Old svn revision: 25040) ChangeLog |9 + Mousepad.desktop.in.in |4 ++-- TODO |1 + mousepad/Makefile.am | 21 - mousepad/mousepad-screen.c | 10 +++--- mousepad/mousepad-window.c |2 +- 6 files changed, 24 insertions(+), 23 deletions(-) diff --git a/ChangeLog b/ChangeLog index 93808dc..641b7e6 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,14 @@ 2007-02-17 Nick Schermer n...@xfce.org + * TODO: Remind myself to fix problems with UTF-8 filenames. + * mousepad/mousepad-window.c: Fix crash when opening files + with the command line. + * Mousepad.desktop.in.in, Mousepad.desktop.in.in: Mousepad executable + is now lowercase again. + * mousepad/mousepad-screen.c: Remove unused signals from the Class. + +2007-02-17 Nick Schermer n...@xfce.org + * TODO, NEWS: Update the current status of the rewrite. * Mousepad.desktop.in.in: Add MimeType and improve Categories. diff --git a/Mousepad.desktop.in.in b/Mousepad.desktop.in.in index e7ae985..38a39eb 100644 --- a/Mousepad.desktop.in.in +++ b/Mousepad.desktop.in.in @@ -4,8 +4,8 @@ Encoding=UTF-8 _Name=Mousepad _Comment=Simple Text Editor _GenericName=Text Editor -Exec=Mousepad %F -Icon=Mousepad +Exec=mousepad %F +Icon=mousepad Terminal=false StartupNotify=true Type=Application diff --git a/TODO b/TODO index da149dc..1e0ed03 100644 --- a/TODO +++ b/TODO @@ -13,6 +13,7 @@ - Saving and loading - Save All option. + - Filenames and UTF-8. - Reload option. Maybe also stat the source file when switching tabs and tell the user if the source was modified. diff --git a/mousepad/Makefile.am b/mousepad/Makefile.am index bb27224..08a4384 100644 --- a/mousepad/Makefile.am +++ b/mousepad/Makefile.am @@ -13,9 +13,9 @@ INCLUDES = \ $(PLATFORM_CPPFLAGS) bin_PROGRAMS = \ - Mousepad + mousepad -Mousepad_SOURCES = \ +mousepad_SOURCES = \ main.c \ mousepad-application.c \ mousepad-application.h \ @@ -34,17 +34,17 @@ Mousepad_SOURCES = \ mousepad-window.h \ mousepad-window-ui.h -Mousepad_CFLAGS = \ +mousepad_CFLAGS = \ $(EXO_CFLAGS) \ $(GTHREAD_CFLAGS) \ $(PLATFORM_CFLAGS) -Mousepad_LDFLAGS = \ +mousepad_LDFLAGS = \ -no-undefined \ $(LIBSM_LDFLAGS)\ $(PLATFORM_LDFLAGS) -Mousepad_LDADD = \ +mousepad_LDADD = \ $(EXO_LIBS) \ $(GTHREAD_LIBS) @@ -52,23 +52,18 @@ if HAVE_DBUS mousepad_build_sources = \ mousepad-dbus-infos.h -Mousepad_SOURCES +=\ +mousepad_SOURCES +=\ mousepad-dbus.c \ mousepad-dbus.h -Mousepad_CFLAGS += \ +mousepad_CFLAGS += \ -DDBUS_API_SUBJECT_TO_CHANGE\ $(DBUS_CFLAGS) -Mousepad_LDADD += \ +mousepad_LDADD += \
[Xfce4-commits] mousepad:master * mousepad/mousepad-window.c: Prevent multiple recent- and go-menu updates when multiple items are opened or the recent history is cleared.
Updating branch refs/heads/master to 64c5d0349576fb0c55f7f9df7e985437c0fe8aea (commit) from f0dc6b97b9512e8121ad3b253562d13f5baca205 (commit) commit 64c5d0349576fb0c55f7f9df7e985437c0fe8aea Author: Nick Schermer n...@xfce.org Date: Wed Feb 28 19:16:13 2007 + * mousepad/mousepad-window.c: Prevent multiple recent- and go-menu updates when multiple items are opened or the recent history is cleared. (Old svn revision: 25044) ChangeLog |6 +++ mousepad/mousepad-window.c | 76 --- 2 files changed, 69 insertions(+), 13 deletions(-) diff --git a/ChangeLog b/ChangeLog index d9d84a6..4e3ee21 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,11 @@ 2007-02-18 Nick Schermer n...@xfce.org + * mousepad/mousepad-window.c: Prevent multiple recent- and go-menu + updates when multiple items are opened or the recent history is + cleared. + +2007-02-18 Nick Schermer n...@xfce.org + * TODO, mousepad/mousepad-window.c: Add option to the recent menu to clear the history. * mousepad/mousepad-window.c: The recent items are now in the Mousepad diff --git a/mousepad/mousepad-window.c b/mousepad/mousepad-window.c index 81d9a66..6a2e885 100644 --- a/mousepad/mousepad-window.c +++ b/mousepad/mousepad-window.c @@ -92,7 +92,7 @@ static void mousepad_window_error_dialog (GtkWindow GError *error, const gchar*message); static void mousepad_window_update_actions (MousepadWindow *window); -static void mousepad_window_rebuild_gomenu (MousepadWindow *window); +static void mousepad_window_go_menu (MousepadWindow *window); static void mousepad_window_selection_changed (MousepadScreen *screen, gbooleanselected, MousepadWindow *window); @@ -232,6 +232,7 @@ static const GtkToggleActionEntry toggle_action_entries[] = static GObjectClass *mousepad_window_parent_class; +static gboolean lock_menu_updates = FALSE; @@ -703,6 +704,9 @@ mousepad_window_open_files (MousepadWindow *window, _mousepad_return_if_fail (filenames != NULL); _mousepad_return_if_fail (*filenames != NULL); + /* block menu updates */ + lock_menu_updates = TRUE; + /* walk through all the filenames */ for (n = 0; filenames[n] != NULL; ++n) { @@ -725,6 +729,13 @@ mousepad_window_open_files (MousepadWindow *window, g_free (filename); filename = NULL; } + + /* allow menu updates again */ + lock_menu_updates = FALSE; + + /* update the menus */ + mousepad_window_recent_menu (window); + mousepad_window_go_menu (window); } @@ -883,7 +894,7 @@ mousepad_window_add (MousepadWindow *window, GTK_WIDGET_UNSET_FLAGS (window-notebook, GTK_CAN_FOCUS); /* rebuild the go menu */ - mousepad_window_rebuild_gomenu (window); + mousepad_window_go_menu (window); /* show the screen */ gtk_widget_show (GTK_WIDGET (screen)); @@ -1004,6 +1015,10 @@ mousepad_window_recent_menu (MousepadWindow *window) GtkAction *action; gint n; + /* leave when we're updating multiple files */ + if (lock_menu_updates) +return; + /* unmerge the ui controls from the previous update */ if (merge_id != 0) gtk_ui_manager_remove_ui (window-ui_manager, merge_id); @@ -1091,6 +1106,9 @@ mousepad_window_recent_menu (MousepadWindow *window) g_list_free (filtered); g_list_foreach (items, (GFunc) gtk_recent_info_unref, NULL); g_list_free (items); + + /* make sure the ui is up2date to avoid flickering */ + gtk_ui_manager_ensure_update (window-ui_manager); } @@ -1222,7 +1240,7 @@ mousepad_window_tab_removed (GtkNotebook*notebook, GTK_WIDGET_UNSET_FLAGS (window-notebook, GTK_CAN_FOCUS); /* rebuild the go menu */ - mousepad_window_rebuild_gomenu (window); + mousepad_window_go_menu (window); /* update all screen sensitive actions */ mousepad_window_update_actions (window); @@ -1237,15 +1255,8 @@ mousepad_window_page_reordered (GtkNotebook *notebook, guintpage_num, MousepadWindow *window) { - GtkWidget *item; - /* update the go menu */ - mousepad_window_rebuild_gomenu (window); - - /* select the item in the menu */ - item = g_object_get_data (G_OBJECT (page), go-menu-item); - if (G_LIKELY (item != NULL)) -gtk_toggle_action_set_active (GTK_TOGGLE_ACTION (item), TRUE); +
[Xfce4-commits] mousepad:master * TODO, mousepad/mousepad-window.c: Add option to the recent menu to clear the history. * mousepad/mousepad-window.c: The recent items are now in the Mousepad group
Updating branch refs/heads/master to f0dc6b97b9512e8121ad3b253562d13f5baca205 (commit) from ff28ae1045a381c7dc815906b9a0816b87451e2b (commit) commit f0dc6b97b9512e8121ad3b253562d13f5baca205 Author: Nick Schermer n...@xfce.org Date: Wed Feb 28 18:14:25 2007 + * TODO, mousepad/mousepad-window.c: Add option to the recent menu to clear the history. * mousepad/mousepad-window.c: The recent items are now in the Mousepad group so it's easier to filter them when removing. The list is also sorted by the most recently used item. * mousepad/mousepad-window.c: Fix problem in checking if the file was already openened. * mousepad/mousepad-window.c: You can now reorder tabs. * mousepad/mousepad-window.c: A tab is now inserted right from the current active tab. * mousepad/mousepad-screen.c: Untitled documents now have a number like Untitled #. The number is increased as long as the application is running. * mousepad/mousepad-window.c: Added first parts of code for a statusbar. (Old svn revision: 25043) ChangeLog | 16 ++ TODO|3 - configure.in.in |2 +- mousepad/main.c |1 - mousepad/mousepad-preferences.c |9 + mousepad/mousepad-screen.c |7 +- mousepad/mousepad-window-ui.xml | 11 +- mousepad/mousepad-window.c | 493 --- 8 files changed, 447 insertions(+), 95 deletions(-) diff --git a/ChangeLog b/ChangeLog index 641b7e6..d9d84a6 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,19 @@ +2007-02-18 Nick Schermer n...@xfce.org + + * TODO, mousepad/mousepad-window.c: Add option to the recent menu + to clear the history. + * mousepad/mousepad-window.c: The recent items are now in the Mousepad + group so it's easier to filter them when removing. The list is also + sorted by the most recently used item. + * mousepad/mousepad-window.c: Fix problem in checking if the + file was already openened. + * mousepad/mousepad-window.c: You can now reorder tabs. + * mousepad/mousepad-window.c: A tab is now inserted right from the + current active tab. + * mousepad/mousepad-screen.c: Untitled documents now have a number like + Untitled #. The number is increased as long as the application is running. + * mousepad/mousepad-window.c: Added first parts of code for a statusbar. + 2007-02-17 Nick Schermer n...@xfce.org * TODO: Remind myself to fix problems with UTF-8 filenames. diff --git a/TODO b/TODO index 1e0ed03..6cb57fe 100644 --- a/TODO +++ b/TODO @@ -1,10 +1,7 @@ - Interface - Dialog when closing multiple (modified) tabs. - - Statusbar (not a priority). - Right-click menu for the tab label. - - Change tabs position. - Tab font color when the file is modified or readonly. - - Clear the recent history. - Text View - Search and Replace. Maybe also text highlighting. diff --git a/configure.in.in b/configure.in.in index 6cbd2a5..dbf3aba 100644 --- a/configure.in.in +++ b/configure.in.in @@ -24,7 +24,7 @@ dnl *** Initialize autoconf *** dnl *** AC_COPYRIGHT([Copyright (c) 2007 The Xfce development team. All rights reserved.]) -AC_INIT([Mousepad], [mousepad_version()], [http://bugzilla.xfce.org/], [Mousepad]) +AC_INIT([Mousepad], [mousepad_version()], [http://bugzilla.xfce.org/], [mousepad]) AC_PREREQ([2.50]) AC_CANONICAL_TARGET() AC_REVISION([$Id$]) diff --git a/mousepad/main.c b/mousepad/main.c index 88045b7..d7102d8 100644 --- a/mousepad/main.c +++ b/mousepad/main.c @@ -108,7 +108,6 @@ main (gint argc, gchar **argv) g_print (%s %s (Xfce %s)\n\n, PACKAGE_NAME, PACKAGE_VERSION, xfce_version_string ()); g_print (%s\n, Copyright (c) 2007); g_print (\t%s\n\n, _(The Xfce development team. All rights reserved.)); - g_print (%s\n\n, _(Written by Nick Schermer n...@xfce.org.)); g_print (_(Please report bugs to %s.), PACKAGE_BUGREPORT); g_print (\n); diff --git a/mousepad/mousepad-preferences.c b/mousepad/mousepad-preferences.c index 4a3f1d1..c3707c6 100644 --- a/mousepad/mousepad-preferences.c +++ b/mousepad/mousepad-preferences.c @@ -53,6 +53,7 @@ enum PROP_LAST_WINDOW_HEIGHT, PROP_LAST_WINDOW_WIDTH, PROP_LINE_NUMBERS, + PROP_STATUSBAR, PROP_WORD_WRAP, PROP_MISC_ALWAYS_SHOW_TABS, PROP_MISC_CYCLE_TABS, @@ -204,6 +205,14 @@ mousepad_preferences_class_init (MousepadPreferencesClass *klass) EXO_PARAM_READWRITE)); g_object_class_install_property (gobject_class, + PROP_STATUSBAR, + g_param_spec_boolean (statusbar, + statusbar, +
[Xfce4-commits] mousepad:master * mousepad/mousepad-window.c: Improve the menu tooltips.
Updating branch refs/heads/master to 5263c479394dbb5a6bc0b892806f11a629bd81f4 (commit) from 64c5d0349576fb0c55f7f9df7e985437c0fe8aea (commit) commit 5263c479394dbb5a6bc0b892806f11a629bd81f4 Author: Nick Schermer n...@xfce.org Date: Wed Feb 28 22:45:19 2007 + * mousepad/mousepad-window.c: Improve the menu tooltips. (Old svn revision: 25045) ChangeLog |4 ++ mousepad/mousepad-window.c | 87 ++-- 2 files changed, 48 insertions(+), 43 deletions(-) diff --git a/ChangeLog b/ChangeLog index 4e3ee21..65840c5 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,9 @@ 2007-02-18 Nick Schermer n...@xfce.org + * mousepad/mousepad-window.c: Improve the menu tooltips. + +2007-02-18 Nick Schermer n...@xfce.org + * mousepad/mousepad-window.c: Prevent multiple recent- and go-menu updates when multiple items are opened or the recent history is cleared. diff --git a/mousepad/mousepad-window.c b/mousepad/mousepad-window.c index 6a2e885..126fa88 100644 --- a/mousepad/mousepad-window.c +++ b/mousepad/mousepad-window.c @@ -92,7 +92,7 @@ static void mousepad_window_error_dialog (GtkWindow GError *error, const gchar*message); static void mousepad_window_update_actions (MousepadWindow *window); -static void mousepad_window_go_menu (MousepadWindow *window); +static void mousepad_window_go_menu (MousepadWindow *window); static void mousepad_window_selection_changed (MousepadScreen *screen, gbooleanselected, MousepadWindow *window); @@ -181,52 +181,52 @@ struct _MousepadWindow static const GtkActionEntry action_entries[] = { - { file-menu, NULL, N_ (_File), NULL, NULL, NULL, }, - { new-tab, tab-new, N_ (New _Tab), controlT, N_ (Open a new Mousepad tab), G_CALLBACK (mousepad_window_action_open_new_tab), }, - { new-window, window-new, N_ (_New Window), controlN, N_ (Open a new Mousepad window), G_CALLBACK (mousepad_window_action_open_new_window), }, - { open-file, GTK_STOCK_OPEN, N_ (_Open File), NULL, N_ (Open a new document), G_CALLBACK (mousepad_window_action_open_file), }, - { recent-menu, NULL, N_ (Open _Recent), NULL, NULL, NULL, }, - { no-recent-items, NULL, N_ (No items found), NULL, NULL, NULL, }, - { clear-recent, GTK_STOCK_CLEAR, N_ (C_lear Recent History), NULL, NULL, G_CALLBACK (mousepad_window_action_clear_recent), }, - { save-file, GTK_STOCK_SAVE, N_ (_Save), NULL, N_ (Save current document), G_CALLBACK (mousepad_window_action_save_file), }, - { save-file-as, GTK_STOCK_SAVE_AS, N_ (Save _As), NULL, N_ (Save current document as another file), G_CALLBACK (mousepad_window_action_save_file_as), }, - { close-tab, GTK_STOCK_CLOSE, N_ (C_lose Tab), controlW, N_ (Close the current Mousepad tab), G_CALLBACK (mousepad_window_action_close_tab), }, - { close-window, GTK_STOCK_QUIT, N_ (_Close Window), controlQ, N_ (Close the Mousepad window), G_CALLBACK (mousepad_window_action_close), }, - { close-all-windows, NULL, N_ (Close _All Windows), controlshiftW, N_ (Close all Mousepad windows), G_CALLBACK (mousepad_window_action_close_all_windows), }, - - { edit-menu, NULL, N_ (_Edit), NULL, NULL, NULL, }, - { undo, GTK_STOCK_UNDO, N_ (_Undo), NULL, NULL, NULL, }, - { redo, GTK_STOCK_REDO, N_ (_Redo), NULL, NULL, NULL, }, - { cut, GTK_STOCK_CUT, N_ (Cu_t), NULL, NULL, G_CALLBACK (mousepad_window_action_cut), }, - { copy, GTK_STOCK_COPY, N_ (_Copy), NULL, NULL, G_CALLBACK (mousepad_window_action_copy), }, - { paste, GTK_STOCK_PASTE, N_ (_Paste), NULL, NULL, G_CALLBACK (mousepad_window_action_paste), }, - { delete, GTK_STOCK_DELETE, N_ (_Delete), NULL, NULL, G_CALLBACK (mousepad_window_action_delete), }, - { select-all, GTK_STOCK_SELECT_ALL, N_ (Select _All), NULL, NULL, G_CALLBACK (mousepad_window_action_select_all), }, - - { search-menu, NULL, N_ (_Search), NULL, NULL, NULL, }, - { find, GTK_STOCK_FIND, N_ (_Find), NULL, NULL, NULL, }, - { find-next, NULL, N_ (Find _Next), NULL, NULL, NULL, }, - { find-previous, NULL, N_ (Find _Previous), NULL, NULL, NULL, }, - { replace, GTK_STOCK_FIND_AND_REPLACE, N_ (_Replace), NULL, NULL, NULL, }, - { jump-to, GTK_STOCK_JUMP_TO, N_ (_Jump To), NULL, NULL, G_CALLBACK (mousepad_window_action_jump_to), }, - - { view-menu, NULL, N_ (_View), NULL, NULL, NULL, }, - { font, GTK_STOCK_SELECT_FONT, N_ (_Font), NULL, N_ (Choose Mousepad font), G_CALLBACK (mousepad_window_action_select_font), }, - - {
[Xfce4-commits] mousepad:master * mousepad/mousepad-dialogs.{c, h}: Add response actions for Mousepad so it's easier to understand what happens. * mousepad/mousepad-window.c, * mousepad/mousepad-sc
Updating branch refs/heads/master to cab0d1a984369283d99376e364e216e7fff04bc3 (commit) from 8a1670c4888db706b49b21c32d78786bf9ed2780 (commit) commit cab0d1a984369283d99376e364e216e7fff04bc3 Author: Nick Schermer n...@xfce.org Date: Sat Mar 3 13:26:35 2007 + * mousepad/mousepad-dialogs.{c,h}: Add response actions for Mousepad so it's easier to understand what happens. * mousepad/mousepad-window.c, * mousepad/mousepad-screen.{c,h}: Basic support for document reloading. (Old svn revision: 25072) ChangeLog |7 +++ mousepad/mousepad-dialogs.c | 81 +++--- mousepad/mousepad-dialogs.h | 15 ++- mousepad/mousepad-private.h |3 + mousepad/mousepad-screen.c | 32 +++ mousepad/mousepad-screen.h |3 + mousepad/mousepad-window-ui.xml |2 + mousepad/mousepad-window.c | 84 ++- 8 files changed, 193 insertions(+), 34 deletions(-) diff --git a/ChangeLog b/ChangeLog index 940a971..ab7c9cd 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,12 @@ 2007-03-03 Nick Schermer n...@xfce.org + * mousepad/mousepad-dialogs.{c,h}: Add response actions for Mousepad so it's + easier to understand what happens. + * mousepad/mousepad-window.c, * mousepad/mousepad-screen.{c,h}: Basic + support for document reloading. + +2007-03-03 Nick Schermer n...@xfce.org + * configure.in.in, mousepad/Makefile.am: Remove the PCRE dependency. I should have removed this earier after some testing. diff --git a/mousepad/mousepad-dialogs.c b/mousepad/mousepad-dialogs.c index dbd9f5c..a26a478 100644 --- a/mousepad/mousepad-dialogs.c +++ b/mousepad/mousepad-dialogs.c @@ -22,6 +22,7 @@ #endif #include mousepad/mousepad-private.h +#include mousepad/mousepad-dialogs.h #include mousepad/mousepad-file.h @@ -117,8 +118,8 @@ mousepad_dialogs_jump_to (GtkWindow *parent, dialog = gtk_dialog_new_with_buttons (_(Jump To), parent, GTK_DIALOG_MODAL | GTK_DIALOG_DESTROY_WITH_PARENT | GTK_DIALOG_NO_SEPARATOR, -GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, -GTK_STOCK_JUMP_TO, GTK_RESPONSE_OK, +GTK_STOCK_CANCEL, MOUSEPAD_RESPONSE_CANCEL, +GTK_STOCK_JUMP_TO, MOUSEPAD_RESPONSE_JUMP_TO, NULL); gtk_dialog_set_default_response (GTK_DIALOG (dialog), GTK_RESPONSE_OK); gtk_window_set_resizable (GTK_WINDOW (dialog), FALSE); @@ -146,7 +147,7 @@ mousepad_dialogs_jump_to (GtkWindow *parent, gtk_widget_show (button); /* run the dialog */ - if (gtk_dialog_run (GTK_DIALOG (dialog)) == GTK_RESPONSE_OK) + if (gtk_dialog_run (GTK_DIALOG (dialog)) == MOUSEPAD_RESPONSE_JUMP_TO) line_number = gtk_spin_button_get_value_as_int (GTK_SPIN_BUTTON (button)); /* destroy the dialog */ @@ -174,13 +175,13 @@ mousepad_dialogs_clear_recent (GtkWindow *parent) history owned by Mousepad.)); gtk_dialog_add_buttons (GTK_DIALOG (dialog), - GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, - GTK_STOCK_CLEAR, GTK_RESPONSE_OK, + GTK_STOCK_CANCEL, MOUSEPAD_RESPONSE_CANCEL, + GTK_STOCK_CLEAR, MOUSEPAD_RESPONSE_CLEAR, NULL); - gtk_dialog_set_default_response (GTK_DIALOG (dialog), GTK_RESPONSE_CANCEL); + gtk_dialog_set_default_response (GTK_DIALOG (dialog), MOUSEPAD_RESPONSE_CANCEL); /* popup the dialog */ - if (gtk_dialog_run (GTK_DIALOG (dialog)) == GTK_RESPONSE_OK) + if (gtk_dialog_run (GTK_DIALOG (dialog)) == MOUSEPAD_RESPONSE_CLEAR) succeed = TRUE; /* destroy the dialog */ @@ -191,7 +192,7 @@ mousepad_dialogs_clear_recent (GtkWindow *parent) -gboolean +gint mousepad_dialogs_save_changes (GtkWindow *parent) { GtkWidget *dialog; @@ -209,12 +210,12 @@ mousepad_dialogs_save_changes (GtkWindow *parent) gtk_dialog_add_action_widget (GTK_DIALOG (dialog), mousepad_dialogs_image_button (GTK_STOCK_DELETE, _(_Don't Save)), -GTK_RESPONSE_REJECT); +MOUSEPAD_RESPONSE_DONT_SAVE); gtk_dialog_add_buttons (GTK_DIALOG (dialog), - GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, - GTK_STOCK_SAVE, GTK_RESPONSE_OK, + GTK_STOCK_CANCEL, MOUSEPAD_RESPONSE_CANCEL, + GTK_STOCK_SAVE, MOUSEPAD_RESPONSE_SAVE, NULL); - gtk_dialog_set_default_response (GTK_DIALOG (dialog), GTK_RESPONSE_OK); + gtk_dialog_set_default_response (GTK_DIALOG
[Xfce4-commits] mousepad:master * mousepad/mousepad-document.c: Because we don't use invisible characters in the text buffer, I was able to write a custom iter search function that can search in bot
Updating branch refs/heads/master to 46e78d17d7e5fc5ae16f9e9ee6ae8103e683af53 (commit) from 4ccd1ba30c425214156b07cf6e58b001fa8970d9 (commit) commit 46e78d17d7e5fc5ae16f9e9ee6ae8103e683af53 Author: Nick Schermer n...@xfce.org Date: Fri Apr 6 13:57:06 2007 + * mousepad/mousepad-document.c: Because we don't use invisible characters in the text buffer, I was able to write a custom iter search function that can search in both directions, can be case insensitive, no string duplications and above all: is over 10x faster then the gtk version. This gives a nice performance boost to the highlight function. * mousepad/mousepad-search-bar.c: Connected the last signals and added a wrap around option to the search bar. (Old svn revision: 25402) ChangeLog | 10 ++ configure.in.in |2 +- mousepad/mousepad-document.c| 202 ++ mousepad/mousepad-preferences.c | 34 ++- mousepad/mousepad-private.h |2 + mousepad/mousepad-search-bar.c | 105 +++- mousepad/mousepad-types.h |5 +- mousepad/mousepad-window.c |1 + 8 files changed, 308 insertions(+), 53 deletions(-) diff --git a/ChangeLog b/ChangeLog index 0ebc98e..3c70f4a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +2007-04-06 Nick Schermer n...@xfce.org + * mousepad/mousepad-document.c: Because we don't use invisible characters in + the text buffer, I was able to write a custom iter search function that can + search in both directions, can be case insensitive, no string duplications + and above all: is over 10x faster then the gtk version. This gives a nice + performance boost to the highlight function. + * mousepad/mousepad-search-bar.c: Connected the last signals and added a + wrap around option to the search bar. + + 2007-04-05 Nick Schermer n...@xfce.org * mousepad/mousepad-document.c: Remove unused properties. diff --git a/configure.in.in b/configure.in.in index 66d719b..272e528 100644 --- a/configure.in.in +++ b/configure.in.in @@ -73,7 +73,7 @@ AC_SUBST([MOUSEPAD_VERSION_MICRO]) dnl ** dnl *** Check for standard headers *** dnl ** -AC_CHECK_HEADERS([errno.h fcntl.h memory.h stdlib.h string.h \ +AC_CHECK_HEADERS([ctype.h errno.h fcntl.h memory.h stdlib.h string.h \ sys/mman.h sys/types.h sys/stat.h time.h unistd.h]) dnl diff --git a/mousepad/mousepad-document.c b/mousepad/mousepad-document.c index e26cf36..8310f09 100644 --- a/mousepad/mousepad-document.c +++ b/mousepad/mousepad-document.c @@ -30,6 +30,9 @@ #ifdef HAVE_TIME_H #include time.h #endif +#ifdef HAVE_CTYPE_H +#include ctype.h +#endif #include mousepad/mousepad-private.h #include mousepad/mousepad-types.h @@ -45,26 +48,33 @@ -static void mousepad_document_class_init (MousepadDocumentClass *klass); -static void mousepad_document_init(MousepadDocument *document); -static void mousepad_document_finalize(GObject *object); -static void mousepad_document_modified_changed(GtkTextBuffer *buffer, - MousepadDocument *document); -static void mousepad_document_notify_has_selection(GtkTextBuffer *buffer, - GParamSpec *pspec, - MousepadDocument *document); -static void mousepad_document_notify_cursor_position (GtkTextBuffer *buffer, - GParamSpec *pspec, - MousepadDocument *document); -static void mousepad_document_toggle_overwrite(GtkTextView *textview, - GParamSpec *pspec, - MousepadDocument *document); -static void mousepad_document_scroll_to_visible_area (MousepadDocument *document); -static void mousepad_document_update_tab (MousepadDocument *document, - GParamSpec *pspec, - GtkWidget *ebox); -static void mousepad_document_tab_button_clicked (GtkWidget *widget, - MousepadDocument *document); +static void mousepad_document_class_init (MousepadDocumentClass *klass); +static void mousepad_document_init
[Xfce4-commits] mousepad:master * mousepad/mousepad-window.c: Fix opening recent files that do not exist. * mousepad/mousepad-window.c, mousepad/mousepad-document.c: Update the window title correctl
Updating branch refs/heads/master to 7b33a930bf6efc2c879dbb304e6ee0fd4adb2b5a (commit) from 46e78d17d7e5fc5ae16f9e9ee6ae8103e683af53 (commit) commit 7b33a930bf6efc2c879dbb304e6ee0fd4adb2b5a Author: Nick Schermer n...@xfce.org Date: Fri Apr 6 16:36:12 2007 + * mousepad/mousepad-window.c: Fix opening recent files that do not exist. * mousepad/mousepad-window.c, mousepad/mousepad-document.c: Update the window title correctly and remove the unused notify::title signals. (Old svn revision: 25404) ChangeLog|6 + mousepad/mousepad-document.c | 29 --- mousepad/mousepad-file.c |9 --- mousepad/mousepad-window.c | 43 + 4 files changed, 46 insertions(+), 41 deletions(-) diff --git a/ChangeLog b/ChangeLog index 3c70f4a..6102442 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,4 +1,10 @@ 2007-04-06 Nick Schermer n...@xfce.org + * mousepad/mousepad-window.c: Fix opening recent files that do not exist. + * mousepad/mousepad-window.c, mousepad/mousepad-document.c: Update the window + title correctly and remove the unused notify::title signals. + + +2007-04-06 Nick Schermer n...@xfce.org * mousepad/mousepad-document.c: Because we don't use invisible characters in the text buffer, I was able to write a custom iter search function that can search in both directions, can be case insensitive, no string duplications diff --git a/mousepad/mousepad-document.c b/mousepad/mousepad-document.c index 8310f09..f64d418 100644 --- a/mousepad/mousepad-document.c +++ b/mousepad/mousepad-document.c @@ -70,9 +70,7 @@ static gboolean mousepad_document_iter_search (const GtkTextIter GtkTextIter *match_end, const GtkTextIter *limit, gboolean forward_search); -static void mousepad_document_update_tab (MousepadDocument *document, -GParamSpec *pspec, -GtkWidget *ebox); +static void mousepad_document_update_tab (MousepadDocument *document); static void mousepad_document_tab_button_clicked (GtkWidget *widget, MousepadDocument *document); @@ -104,7 +102,8 @@ struct _MousepadDocument /* the highlight tag */ GtkTextTag*tag; - /* the tab label */ + /* the tab label and ebox */ + GtkWidget *ebox; GtkWidget *label; /* absolute path of the file */ @@ -472,6 +471,9 @@ mousepad_document_set_filename (MousepadDocument *document, /* create the new names */ document-filename = g_strdup (filename); document-display_name = g_filename_display_basename (filename); + + /* update the tab label and tooltip */ + mousepad_document_update_tab (document); } @@ -1034,7 +1036,6 @@ GtkWidget * mousepad_document_get_tab_label (MousepadDocument *document) { GtkWidget *hbox; - GtkWidget *ebox; GtkWidget *button, *image; /* create the box */ @@ -1042,21 +1043,19 @@ mousepad_document_get_tab_label (MousepadDocument *document) gtk_widget_show (hbox); /* the ebox */ - ebox = g_object_new (GTK_TYPE_EVENT_BOX, border-width, 2, NULL); - gtk_box_pack_start (GTK_BOX (hbox), ebox, TRUE, TRUE, 0); - gtk_widget_show (ebox); + document-ebox = g_object_new (GTK_TYPE_EVENT_BOX, border-width, 2, NULL); + gtk_box_pack_start (GTK_BOX (hbox), document-ebox, TRUE, TRUE, 0); + gtk_widget_show (document-ebox); /* create the label */ document-label = g_object_new (GTK_TYPE_LABEL, selectable, FALSE, xalign, 0.0, NULL); - gtk_container_add (GTK_CONTAINER (ebox), document-label); + gtk_container_add (GTK_CONTAINER (document-ebox), document-label); gtk_widget_show (document-label); /* update the tab and add signal to the ebox for a title update */ - mousepad_document_update_tab (document, NULL, ebox); - g_signal_connect (G_OBJECT (document), notify::title, -G_CALLBACK (mousepad_document_update_tab), ebox); + mousepad_document_update_tab (document); /* create the button */ button = g_object_new (GTK_TYPE_BUTTON, @@ -1082,16 +1081,14 @@ mousepad_document_get_tab_label (MousepadDocument *document) static void -mousepad_document_update_tab (MousepadDocument *document, - GParamSpec *pspec, - GtkWidget*ebox) +mousepad_document_update_tab (MousepadDocument *document) { /* set the tab
[Xfce4-commits] mousepad:master * mousepad/mousepad-{document, window, statusbar}: You can now click the OVR text in the statusbar to toggle the overwrite mode. * mousepad/mousepad-{document, windo
Updating branch refs/heads/master to ec1234c58d36457576ea554ac2fd5885da962fd7 (commit) from fe666120450ea8df11059d60c0bcdb806d3d5426 (commit) commit ec1234c58d36457576ea554ac2fd5885da962fd7 Author: Nick Schermer n...@xfce.org Date: Wed Apr 11 08:22:46 2007 + * mousepad/mousepad-{document,window,statusbar}: You can now click the OVR text in the statusbar to toggle the overwrite mode. * mousepad/mousepad-{document,window,undo}: Initial version of an undo manager. This is not finished yet, but it's a start. * mousepad/Makefile.am, mousepad/mousepad-csource.pl: Remove my perl script because it has some problems. Use exo-csource instead. * Remove some empty object functions. (Old svn revision: 25514) ChangeLog | 10 + configure.in.in | 11 + mousepad/Makefile.am| 17 +- mousepad/mousepad-csource.pl| 90 -- mousepad/mousepad-document.c| 138 +- mousepad/mousepad-document.h| 11 + mousepad/mousepad-private.h |1 + mousepad/mousepad-search-bar.c |9 +- mousepad/mousepad-statusbar.c | 72 - mousepad/mousepad-undo.c| 592 +++ mousepad/mousepad-undo.h| 57 mousepad/mousepad-view.c| 24 +-- mousepad/mousepad-window-ui.xml |2 + mousepad/mousepad-window.c | 92 ++- 14 files changed, 984 insertions(+), 142 deletions(-) diff --git a/ChangeLog b/ChangeLog index f4f4ef9..2e8dbf5 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +2007-04-xx Nick Schermer n...@xfce.org + * mousepad/mousepad-{document,window,statusbar}: You can now click the OVR + text in the statusbar to toggle the overwrite mode. + * mousepad/mousepad-{document,window,undo}: Initial version of an undo + manager. This is not finished yet, but it's a start. + * mousepad/Makefile.am, mousepad/mousepad-csource.pl: Remove my perl script + because it has some problems. Use exo-csource instead. + * Remove some empty object functions. + + 2007-04-06 Nick Schermer n...@xfce.org * mousepad/mousepad-document.c: Fix segfault from previous commit. * mousepad/mousepad-document.c: Fix bug in searching backwards, we have to diff --git a/configure.in.in b/configure.in.in index 272e528..4ae2f42 100644 --- a/configure.in.in +++ b/configure.in.in @@ -110,6 +110,12 @@ XDT_CHECK_OPTIONAL_PACKAGE([LIBSTARTUP_NOTIFICATION], [0.4], [startup-notification], [startup notification library]) +dnl *** +dnl *** Optional support for unix print support in GTK+ *** +dnl *** +XDT_CHECK_OPTIONAL_PACKAGE([GTK_UNIX_PRINT], [gtk+-unix-print-2.0], + [2.10.0], [gtk_unix_print], [GTK+ Unix print support]) + dnl * dnl *** Check for gtk-doc *** dnl * @@ -234,4 +240,9 @@ echo * Startup Notification: yes else echo * Startup Notification: no fi +if test x$GTK_UNIX_PRINT_FOUND = xyes; then +echo * GTK+ Unix Print Support: yes +else +echo * GTK+ Unix Print Support: no +fi echo diff --git a/mousepad/Makefile.am b/mousepad/Makefile.am index 429aa9f..9ec9015 100644 --- a/mousepad/Makefile.am +++ b/mousepad/Makefile.am @@ -46,13 +46,15 @@ mousepad_SOURCES = \ mousepad-statusbar.h \ mousepad-view.c \ mousepad-view.h \ + mousepad-undo.c \ + mousepad-undo.h \ mousepad-window.c \ mousepad-window.h \ mousepad-window-ui.h mousepad_CFLAGS = \ $(GTK_CFLAGS) \ - $(LIBXFCE4UTIL_CFLAGS) \ + $(LIBXFCE4UTIL_CFLAGS) \ $(GMODULE_CFLAGS) \ $(GTHREAD_CFLAGS) \ $(PLATFORM_CFLAGS) @@ -63,7 +65,7 @@ mousepad_LDFLAGS = \ mousepad_LDADD = \ $(GTK_LIBS) \ - $(LIBXFCE4UTIL_LIBS) \ +
[Xfce4-commits] mousepad:master * mousepad/mousepad-{window, view}.c: Fix some potential leaks, I'm not really sure, but it doesn't hurt...
Updating branch refs/heads/master to 0210f46f4a9e604a52bda681c820e66d352303e5 (commit) from d45ae8eaa022bd99c25c0db5e68594e12b25281d (commit) commit 0210f46f4a9e604a52bda681c820e66d352303e5 Author: Nick Schermer n...@xfce.org Date: Wed Apr 11 17:41:54 2007 + * mousepad/mousepad-{window,view}.c: Fix some potential leaks, I'm not really sure, but it doesn't hurt... (Old svn revision: 25523) ChangeLog |4 mousepad/mousepad-view.c | 13 + mousepad/mousepad-window.c |1 + 3 files changed, 18 insertions(+), 0 deletions(-) diff --git a/ChangeLog b/ChangeLog index 631e00d..e30174d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,4 +1,8 @@ 2007-04-11 Nick Schermer n...@xfce.org + * mousepad/mousepad-{window,view}.c: Fix some potential leaks, I'm not + really sure, but it doesn't hurt... + +2007-04-11 Nick Schermer n...@xfce.org * mousepad/mousepad-statusbar.c: Destroy the tool items together with the searchbar (memory leak from valgrind). diff --git a/mousepad/mousepad-view.c b/mousepad/mousepad-view.c index cc6afd7..5f9fba3 100644 --- a/mousepad/mousepad-view.c +++ b/mousepad/mousepad-view.c @@ -33,6 +33,7 @@ static void mousepad_view_class_init (MousepadViewClass *klass); +static void mousepad_view_finalize (GObject *object); static gboolean mousepad_view_key_press_event (GtkWidget *widget, GdkEventKey *event); static void mousepad_view_indent_lines (MousepadView *view, @@ -96,10 +97,14 @@ mousepad_view_get_type (void) static void mousepad_view_class_init (MousepadViewClass *klass) { + GObjectClass *gobject_class; GtkWidgetClass *widget_class; mousepad_view_parent_class = g_type_class_peek_parent (klass); + gobject_class = G_OBJECT_CLASS (klass); + gobject_class-finalize = mousepad_view_finalize; + widget_class = GTK_WIDGET_CLASS (klass); widget_class-key_press_event = mousepad_view_key_press_event; widget_class-expose_event = mousepad_view_expose; @@ -107,6 +112,14 @@ mousepad_view_class_init (MousepadViewClass *klass) +static void +mousepad_view_finalize (GObject *object) +{ + (*G_OBJECT_CLASS (mousepad_view_parent_class)-finalize) (object); +} + + + /** * mousepad_view_key_press_event: * @widget : A #GtkWidget. diff --git a/mousepad/mousepad-window.c b/mousepad/mousepad-window.c index 14affd9..15f9f0a 100644 --- a/mousepad/mousepad-window.c +++ b/mousepad/mousepad-window.c @@ -550,6 +550,7 @@ mousepad_window_finalize (GObject *object) g_closure_unref (window-menu_item_selected_closure); /* release the ui manager */ + g_signal_handlers_disconnect_matched (G_OBJECT (window-ui_manager), G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, window); g_object_unref (G_OBJECT (window-ui_manager)); /* release the action groups */ ___ Xfce4-commits mailing list Xfce4-commits@xfce.org https://mail.xfce.org/mailman/listinfo/xfce4-commits
[Xfce4-commits] mousepad:master * mousepad/mousepad-undo.c: Improve the behavior of the undo manager. It now merges multiple spaces, new lines are a separate undo action and when you redo some steps
Updating branch refs/heads/master to 44f28f94cfd8b18c76852726550c2fc476fb4801 (commit) from 0210f46f4a9e604a52bda681c820e66d352303e5 (commit) commit 44f28f94cfd8b18c76852726550c2fc476fb4801 Author: Nick Schermer n...@xfce.org Date: Thu Apr 12 19:38:59 2007 + * mousepad/mousepad-undo.c: Improve the behavior of the undo manager. It now merges multiple spaces, new lines are a separate undo action and when you redo some steps and then start editing again we append the redo-ed steps in reversed order with an inverted action, so you can undo every thing afterwards. This consumes a bit more memory compared to the old behavior (which simply removed every redo-ed step), but it's much more consistent. (Old svn revision: 25531) ChangeLog| 11 +++ mousepad/mousepad-undo.c | 189 ++ 2 files changed, 134 insertions(+), 66 deletions(-) diff --git a/ChangeLog b/ChangeLog index e30174d..c966bb8 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,11 +1,22 @@ +2007-04-12 Nick Schermer n...@xfce.org + * mousepad/mousepad-undo.c: Improve the behavior of the undo manager. + It now merges multiple spaces, new lines are a separate undo action and + when you redo some steps and then start editing again we append the redo-ed + steps in reversed order with an inverted action, so you can undo every thing + afterwards. This consumes a bit more memory compared to the old behavior + (which simply removed every redo-ed step), but it's much more consistent. + + 2007-04-11 Nick Schermer n...@xfce.org * mousepad/mousepad-{window,view}.c: Fix some potential leaks, I'm not really sure, but it doesn't hurt... + 2007-04-11 Nick Schermer n...@xfce.org * mousepad/mousepad-statusbar.c: Destroy the tool items together with the searchbar (memory leak from valgrind). + 2007-04-11 Nick Schermer n...@xfce.org * mousepad/mousepad-{document,window,statusbar}: You can now click the OVR text in the statusbar to toggle the overwrite mode. diff --git a/mousepad/mousepad-undo.c b/mousepad/mousepad-undo.c index 874538f..51b094b 100644 --- a/mousepad/mousepad-undo.c +++ b/mousepad/mousepad-undo.c @@ -27,7 +27,7 @@ /* maximum number of steps in the undo manager */ -#define MAX_UNDO_STEPS 50 +#define MAX_UNDO_STEPS 75 @@ -54,7 +54,7 @@ struct _MousepadUndoClass struct _MousepadUndo { - GObject __parent__; + GObject __parent__; /* the text buffer we're monitoring */ GtkTextBuffer *buffer; @@ -63,7 +63,7 @@ struct _MousepadUndo guint locked; /* list of undo steps */ - GSList *steps; + GList *steps; /* position in the steps list */ gintsteps_position; @@ -75,6 +75,7 @@ struct _MousepadUndo MousepadUndoAction step_action; gintstep_start; gintstep_end; + guint step_isspaces : 1; /* whether we can undo and redo */ guint can_undo : 1; @@ -99,7 +100,8 @@ struct _MousepadUndoInfo static void mousepad_undo_class_init (MousepadUndoClass *klass); static void mousepad_undo_init (MousepadUndo *undo); static void mousepad_undo_finalize (GObject*object); -static void mousepad_undo_free_step(MousepadUndoInfo *info); +static void mousepad_undo_free_step(MousepadUndoInfo *info, + MousepadUndo *undo); static void mousepad_undo_preform_step (MousepadUndo *undo, gbooleanundo_step); static void mousepad_undo_new_step (MousepadUndo *undo); @@ -182,7 +184,7 @@ mousepad_undo_init (MousepadUndo *undo) undo-can_undo = FALSE; undo-can_redo = FALSE; - /* allocate the string buffer (we prealloc 15 characters to avoid mulitple reallocations ) */ + /* allocate the string buffer (we prealloc 15 characters to avoid multiple reallocations) */ undo-step_buffer = g_string_sized_new (15); } @@ -192,14 +194,14 @@ static void mousepad_undo_finalize (GObject *object) { MousepadUndo *undo = MOUSEPAD_UNDO (object); - GSList *li; + GList*li; /* cleanup the undo steps */ for (li = undo-steps; li != NULL; li = li-next) -mousepad_undo_free_step (li-data); +mousepad_undo_free_step (li-data, undo); /* free the list */ - g_slist_free (undo-steps); + g_list_free (undo-steps); /* cleanup the monitor step */ g_string_free (undo-step_buffer, TRUE); @@ -213,8 +215,12 @@ mousepad_undo_finalize (GObject *object) static void -mousepad_undo_free_step (MousepadUndoInfo *info) +mousepad_undo_free_step (MousepadUndoInfo *info, + MousepadUndo *undo) { + /*
[Xfce4-commits] mousepad:master * TODO, NEWS: Update and expand both documents. * mousepad/mousepad-search-bar.c, mousepad-window.c: Fix some compiler warnings.
Updating branch refs/heads/master to 666a0aebba2bca3fbeee5a650fe9ffa160455348 (commit) from a47b71f49c5221348b83135ffbcf2a05abdebeb4 (commit) commit 666a0aebba2bca3fbeee5a650fe9ffa160455348 Author: Nick Schermer n...@xfce.org Date: Fri Apr 20 10:55:16 2007 + * TODO, NEWS: Update and expand both documents. * mousepad/mousepad-search-bar.c, mousepad-window.c: Fix some compiler warnings. (Old svn revision: 25615) ChangeLog |9 +++ NEWS | 57 -- TODO | 81 +--- 3 files changed, 91 insertions(+), 56 deletions(-) diff --git a/ChangeLog b/ChangeLog index c966bb8..18565d8 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2007-04-20 Nick Schermer n...@xfce.org + * TODO, NEWS: Update and expand both documents. + + +2007-04-19 Erik Harrison erikharri...@xfce.org + * mousepad/mousepad-search-bar.c, mousepad-window.c: Fix some + compiler warnings. + + 2007-04-12 Nick Schermer n...@xfce.org * mousepad/mousepad-undo.c: Improve the behavior of the undo manager. It now merges multiple spaces, new lines are a separate undo action and diff --git a/NEWS b/NEWS index 0acaa08..b7922bb 100644 --- a/NEWS +++ b/NEWS @@ -1,30 +1,27 @@ -Mousepad 0.3.x -== -New core features: - - Everything is written in GObjects. - - Run multiple windows in one instance. - - Type-ahead find feature like Firefox. - - Tab support. - - Loading multiple files at once (in new tabs). Both multiple -select in the open dialog and by using the command line is supported. - - Hidden settings -- Set the recent menu limit. - - Support for editable menu accelerators. - - Using MMAP for loading files. - - Items in the recent menu are removed when Mousepad was unable -to open it. - - -Bug that can be closed: - 2941 - Save button is now default response in the dialog. - 2720 - No font is set as long the user doesn't defined any. - 1697 - No compiler warnings. - 2945 - Windows geometry is now properly saved. - 2896 - Hidden option to show to full path in the window title. - 2397 - Basic command line options. - 2786 - The MousepadPreferences object uses XfceRc for saving the settings. - 2784 - No crashes when there is no rc file. - -Bug that won't be fixed: - 956 - Xfce About dialog. This allows us to depend on libxfcegui4 for one - dialog, so we're not going to do that and use the Gtk about dialog. +0.3.0 += +- A complete rewrite of Mousepad. The code is now written in GOjects + where possible so we have a solid base for further development. +- Run multiple windows in one instance. We also invoke a running + instance with DBus (optional), this is needed for tab DND between + windows. +- Support for multiple tabs in one window. +- Load multiple files at once from both the open dialog and the command + line. +- Type-ahead find and highlight feature like Firefox. +- Support for editable menu accelerators. +- Reimplemented recent file support. You can cleanup the Mousepad history + and a file is removed from the history when Mousepad was unable to open + it. +- Various hidden settings. +- Statusbar with cursor location and whether overwrite is actived. +- Mousepad depends on GTK+ 2.10. +- Save button is now default response in the dialog (Bug #2941). +- No font is set as long the user has not defined any (Bug #2720). +- No compiler warnings (Bug #1697). +- Windows geometry is now properly saved (Bug #2945). +- Hidden option to show to full path in the window title (Bug #2896). +- Basic command line options (Bug #2397). +- The MousepadPreferences object uses XfceRc for saving the + settings (Bug #2786). +- No crashes when there is no rc file (Bug #2784). diff --git a/TODO b/TODO index bc2f4bd..9692099 100644 --- a/TODO +++ b/TODO @@ -1,26 +1,55 @@ -- Interface - - Dialog when closing multiple (modified) tabs. - - Tab font color when the file is modified or readonly. - - Test the application with a screen reader and add Atk objects -where needed. - -- Text View - - Search and Replace. Maybe also text highlighting. - - GObject for undo/redo that is used by MousepadView. - - Support for encoding. - -- Saving and loading - - Save All option. - - Filenames and UTF-8. - - Reload option. Maybe also stat the source file when switching -tabs and tell the user if the source was modified. - -- Other - - Implement Gtk print support. - - Maybe add support for gtksourceview and/or gtkspell (not a priority). - -- Testing - - Profiling the startup time. - - Profiling loading large files (Gtk has a problem here). This also -locks some dialogs. - - Checking for memory leaks. +Interface += +- Dialog when closing multiple (modified) tabs. Maybe not needed + since we ask the use what to do when a modified file is closed. +- Tab font color when the file is
[Xfce4-commits] mousepad:master * TODO: Add some stuff.
Updating branch refs/heads/master to 35f0b25ab3c544412ef32b71e4a8dd514142c281 (commit) from 666a0aebba2bca3fbeee5a650fe9ffa160455348 (commit) commit 35f0b25ab3c544412ef32b71e4a8dd514142c281 Author: Nick Schermer n...@xfce.org Date: Sat Apr 21 19:18:52 2007 + * TODO: Add some stuff. (Old svn revision: 25621) ChangeLog |4 TODO | 29 +++-- 2 files changed, 23 insertions(+), 10 deletions(-) diff --git a/ChangeLog b/ChangeLog index 18565d8..49d42b5 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,4 +1,8 @@ 2007-04-20 Nick Schermer n...@xfce.org + * TODO: Add some stuff. + + +2007-04-20 Nick Schermer n...@xfce.org * TODO, NEWS: Update and expand both documents. diff --git a/TODO b/TODO index 9692099..d808e6a 100644 --- a/TODO +++ b/TODO @@ -8,15 +8,20 @@ Interface - Support for tab DND between windows. - Support for dropping uris inside the window and then open them in a new tab. -- Cleanup the menus and make they consistent. For example: we're +- Cleanup the menus and make them consistent. For example: we're using both file and document atm. The name of the Go menu should also be changed to something more descriptive. - You can't use the Ctrl - v/c/x buttons in the type-ahead bar because they are 'registered' by the textview/ui. -- Maybe add a document icon to the recent menu. In a perfect situation - we shoud detect the mime from the file and not by using the mime - info from GtkRecentInfo, but this is proabably too much work for - Mousepad. +- Maybe add a document icon to the recent menu. In a perfect + situation we shoud detect the mime from the file and not by using + the mime info from GtkRecentInfo, but this is proabably too much + work for Mousepad. +- Set the mime type when saving the resent file, not for us, both for + applications that might use the entire recent history. +- Remove the frame borders from the statusbar (we can entirely drop + the frames) and add a resize grip. This way it will look like a + real Gtk statusbar. Code @@ -36,6 +41,8 @@ Saving and loading - Save All option. - Support for encoding. Only UTF-8 is supported atm for testing. - The filenames used in the title and tooltips are not UTF-8 safe. + We also have to make sure _ characters inside a filename do not + result in mnemonic labels. - Check if the file is externally modified when switching tabs. @@ -47,9 +54,11 @@ Other cannot attach to an existing textview (GtkSpell can). -Testing -=== -- Profiling the startup time. -- Profiling loading large files (Gtk/Pango has a problem here). This also - locks some dialogs. +Testing and polishing += +- Profiling the startup time. We can possibly use Frederico's trick + to optimize the startup time: + http://primates.ximian.com/~federico/news-2006-03.html#09 +- Profiling loading large files (Gtk/Pango has a problem here). This + also locks some dialogs. - Checking for memory leaks. ___ Xfce4-commits mailing list Xfce4-commits@xfce.org https://mail.xfce.org/mailman/listinfo/xfce4-commits
[Xfce4-commits] mousepad:master * TODO: Fix some typos and add some new ideas and reminders.
Updating branch refs/heads/master to a20de9eada02c7cc07cda472ea4f197c3e3b97aa (commit) from 35f0b25ab3c544412ef32b71e4a8dd514142c281 (commit) commit a20de9eada02c7cc07cda472ea4f197c3e3b97aa Author: Nick Schermer n...@xfce.org Date: Sun Apr 22 08:23:48 2007 + * TODO: Fix some typos and add some new ideas and reminders. (Old svn revision: 25622) ChangeLog |4 TODO | 37 - 2 files changed, 32 insertions(+), 9 deletions(-) diff --git a/ChangeLog b/ChangeLog index 49d42b5..4c0e334 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2007-04-21 Nick Schermer n...@xfce.org + * TODO: Fix some typos and add some new ideas and reminders. + + 2007-04-20 Nick Schermer n...@xfce.org * TODO: Add some stuff. diff --git a/TODO b/TODO index d808e6a..0182096 100644 --- a/TODO +++ b/TODO @@ -1,8 +1,16 @@ +All the items below, except those under the feature heading, must +be fixed (or ignored when irrelevant) before the nick_0_3 branch +can move to trunk. When the branch enters trunk, it's important +we work towards a stable version, so we can release a 0.2.90.1 +(0.3 beta 1) version as soon as possible (if needed, independent +from the Xfce schedule). + + Interface = - Dialog when closing multiple (modified) tabs. Maybe not needed since we ask the use what to do when a modified file is closed. -- Tab font color when the file is modified or readonly. +- Tab font color when the file is modified or read only. - Test the application with a screen reader and add Atk objects where needed. - Support for tab DND between windows. @@ -15,10 +23,11 @@ Interface because they are 'registered' by the textview/ui. - Maybe add a document icon to the recent menu. In a perfect situation we shoud detect the mime from the file and not by using - the mime info from GtkRecentInfo, but this is proabably too much + the mime info from GtkRecentInfo, but this is probably too much work for Mousepad. -- Set the mime type when saving the resent file, not for us, both for +- Set the mime type when saving the recent file, not for us, but for applications that might use the entire recent history. +- When hitting the enter button in the jump dialog, we should jump. - Remove the frame borders from the statusbar (we can entirely drop the frames) and add a resize grip. This way it will look like a real Gtk statusbar. @@ -26,7 +35,8 @@ Interface Code -- Check for code dupplication and make sure the comments are worth +- Cleanup mousepad-document.h. The order of the functions is a mess. +- Check for code duplication and make sure the comments are worth reading. @@ -34,14 +44,15 @@ Text View = - Replace dialog. This dialog should also provide a find button so there is an alternative for the type-ahead feature. +- Maybe a match whole word option. Saving and loading == - Save All option. -- Support for encoding. Only UTF-8 is supported atm for testing. +- Support for encoding. Only UTF-8 is supported for testing. - The filenames used in the title and tooltips are not UTF-8 safe. - We also have to make sure _ characters inside a filename do not + We also have to make sure _ characters in a filename do not result in mnemonic labels. - Check if the file is externally modified when switching tabs. @@ -49,9 +60,8 @@ Saving and loading Other = - Implement Gtk print support. -- Maybe a plugin based system for syntax highlighting and GtkSpell. - We cannot use GtkSourceView with this implementation, because it - cannot attach to an existing textview (GtkSpell can). +- We need a cool Mousepad logo. +- Write documentation. Testing and polishing @@ -62,3 +72,12 @@ Testing and polishing - Profiling loading large files (Gtk/Pango has a problem here). This also locks some dialogs. - Checking for memory leaks. +- Make sure objects are unrefed when their parent is destroyed, Gtk+ + does not always take care of this. + + +Feature +=== +- Maybe a plugin based system for syntax highlighting and GtkSpell. + We cannot use GtkSourceView with this implementation, because it + cannot attach to an existing textview (GtkSpell can). ___ Xfce4-commits mailing list Xfce4-commits@xfce.org https://mail.xfce.org/mailman/listinfo/xfce4-commits
[Xfce4-commits] mousepad:master * mousepad/mousepad-dbus-infos.xml, mousepad/mousepad-undo.c, mousepad/mousepad-view.c: Fix some typos and replace tabs.
Updating branch refs/heads/master to 5cd70d2665de061f5c64d6a7a21b5f564eeec813 (commit) from 72d49ecc7196fe7c8d5479e978593718e3b17a39 (commit) commit 5cd70d2665de061f5c64d6a7a21b5f564eeec813 Author: Nick Schermer n...@xfce.org Date: Tue May 1 16:07:57 2007 + * mousepad/mousepad-dbus-infos.xml, mousepad/mousepad-undo.c, mousepad/mousepad-view.c: Fix some typos and replace tabs. (Old svn revision: 25662) ChangeLog|5 + mousepad/mousepad-dbus-infos.xml | 28 ++-- mousepad/mousepad-undo.c | 38 +++--- mousepad/mousepad-view.c |6 +++--- 4 files changed, 41 insertions(+), 36 deletions(-) diff --git a/ChangeLog b/ChangeLog index f9de9f2..5df6ff7 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,4 +1,9 @@ 2007-05-01 Nick Schermer n...@xfce.org + * mousepad/mousepad-dbus-infos.xml, mousepad/mousepad-undo.c, + mousepad/mousepad-view.c: Fix some typos and replace tabs. + + +2007-05-01 Nick Schermer n...@xfce.org * mousepad/mousepad-{document,window}.c: Allow uri and tab drops inside the textview widget. * mousepad/mousepad-window.c: Hide the searchbar when all the diff --git a/mousepad/mousepad-dbus-infos.xml b/mousepad/mousepad-dbus-infos.xml index 4787ba8..1182a5e 100644 --- a/mousepad/mousepad-dbus-infos.xml +++ b/mousepad/mousepad-dbus-infos.xml @@ -1,29 +1,29 @@ ?xml version=1.0 encoding=UTF-8? !-- - $Id$ + $Id$ - Copyright (c) 2007 Nick Schermer n...@xfce.org + Copyright (c) 2007 Nick Schermer n...@xfce.org - This program is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by the Free - Software Foundation; either version 2 of the License, or (at your option) - any later version. + This program is free software; you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by the Free + Software Foundation; either version 2 of the License, or (at your option) + any later version. - This program is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for - more details. + This program is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for + more details. - You should have received a copy of the GNU General Public License along with - this program; if not, write to the Free Software Foundation, Inc., 59 Temple - Place, Suite 330, Boston, MA 02111-1307 USA + You should have received a copy of the GNU General Public License along with + this program; if not, write to the Free Software Foundation, Inc., 59 Temple + Place, Suite 330, Boston, MA 02111-1307 USA -- node name=/org/xfce/Mousepad !-- -org.xfce.Thunar +org.xfce.Mousepad The Mousepad specific interface, which provides Mousepad specific methods. diff --git a/mousepad/mousepad-undo.c b/mousepad/mousepad-undo.c index 51b094b..3fa6fba 100644 --- a/mousepad/mousepad-undo.c +++ b/mousepad/mousepad-undo.c @@ -332,21 +332,21 @@ mousepad_undo_new_step (MousepadUndo *undo) if (undo-steps_position != length) for (i = length - 1; i = undo-steps_position; i--) { - /* get the existing step */ - existing = g_list_nth_data (undo-steps, i); +/* get the existing step */ +existing = g_list_nth_data (undo-steps, i); - /* allocate a new slice */ - info = g_slice_new0 (MousepadUndoInfo); +/* allocate a new slice */ +info = g_slice_new0 (MousepadUndoInfo); - /* copy the data from the existing step */ - info-string = g_strdup (existing-string); - info-start = existing-start; - info-end= existing-end; +/* copy the data from the existing step */ +info-string = g_strdup (existing-string); +info-start = existing-start; +info-end= existing-end; - /* set the inverted action */ - info-action = (existing-action == INSERT ? DELETE : INSERT); +/* set the inverted action */ +info-action = (existing-action == INSERT ? DELETE : INSERT); - /* append to the steps list */ +/* append to the steps list */ undo-steps = g_list_append (undo-steps, info); } @@ -405,12 +405,12 @@ mousepad_undo_handle_step (const gchar*text, /* only do this if there is 1 character typed / deleted */ if (length == 1) { - /* get the character */ - c = g_utf8_get_char (text); + /* get the character */ + c = g_utf8_get_char (text); - /* check if the charater is a space or a
[Xfce4-commits] mousepad:master * configure.in.in: Don't break on a broken glibc.
Updating branch refs/heads/master to 932f662654e9f024422e8fd806a8b9b90cc6149a (commit) from 5cd70d2665de061f5c64d6a7a21b5f564eeec813 (commit) commit 932f662654e9f024422e8fd806a8b9b90cc6149a Author: Nick Schermer n...@xfce.org Date: Tue May 1 21:16:15 2007 + * configure.in.in: Don't break on a broken glibc. (Old svn revision: 25664) ChangeLog |4 configure.in.in | 17 + 2 files changed, 21 insertions(+), 0 deletions(-) diff --git a/ChangeLog b/ChangeLog index 5df6ff7..d34ab82 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,4 +1,8 @@ 2007-05-01 Nick Schermer n...@xfce.org + * configure.in.in: Don't break on a broken glibc. + + +2007-05-01 Nick Schermer n...@xfce.org * mousepad/mousepad-dbus-infos.xml, mousepad/mousepad-undo.c, mousepad/mousepad-view.c: Fix some typos and replace tabs. diff --git a/configure.in.in b/configure.in.in index 4ae2f42..45f0892 100644 --- a/configure.in.in +++ b/configure.in.in @@ -82,6 +82,23 @@ dnl AC_FUNC_MMAP() AC_CHECK_FUNCS([posix_madvise]) +dnl ** +dnl *** Linux/glibc specified work-arounds *** +dnl ** +AC_MSG_CHECKING([whether we need _BSD_SOURCE and _XOPEN_SOURCE]) +AC_TRY_LINK([#include features.h], +[ + if (__GLIBC_PREREQ (2, 0)); +], +[ + AC_DEFINE([_XOPEN_SOURCE], [600], [Required to unbreak glibc]) + AC_DEFINE([_BSD_SOURCE], [1], [Required to unbreak glibc]) + AC_MSG_RESULT([yes]) +], +[ + AC_MSG_RESULT([no]) +]) + dnl ** dnl *** Check for i18n support *** dnl ** ___ Xfce4-commits mailing list Xfce4-commits@xfce.org https://mail.xfce.org/mailman/listinfo/xfce4-commits
[Xfce4-commits] mousepad:master * mousepad/mousepad-{document, window}.c: Allow uri and tab drops inside the textview widget. * mousepad/mousepad-window.c: Hide the searchbar when all the tabs are
Updating branch refs/heads/master to 72d49ecc7196fe7c8d5479e978593718e3b17a39 (commit) from 2beb0bf4ad103e2bc112b516f6253157e821e2a7 (commit) commit 72d49ecc7196fe7c8d5479e978593718e3b17a39 Author: Nick Schermer n...@xfce.org Date: Tue May 1 15:59:28 2007 + * mousepad/mousepad-{document,window}.c: Allow uri and tab drops inside the textview widget. * mousepad/mousepad-window.c: Hide the searchbar when all the tabs are closed and make sure nothing segfaults when no active document is found. * mousepad/mousepad-window.c: Make sure the textview is focused when a new document has been added. (Old svn revision: 25661) ChangeLog| 10 ++ TODO |2 - mousepad/mousepad-document.c | 51 +-- mousepad/mousepad-view.c |8 +- mousepad/mousepad-window.c | 205 +++--- mousepad/mousepad-window.h | 12 +++ 6 files changed, 180 insertions(+), 108 deletions(-) diff --git a/ChangeLog b/ChangeLog index dfa8d47..f9de9f2 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +2007-05-01 Nick Schermer n...@xfce.org + * mousepad/mousepad-{document,window}.c: Allow uri and tab + drops inside the textview widget. + * mousepad/mousepad-window.c: Hide the searchbar when all the + tabs are closed and make sure nothing segfaults when no + active document is found. + * mousepad/mousepad-window.c: Make sure the textview is + focused when a new document has been added. + + 2007-04-28 Nick Schermer n...@xfce.org * TODO: Removed the items I've fixed. * Changelog: Break after 70 characters. diff --git a/TODO b/TODO index 21da6cc..fe0db97 100644 --- a/TODO +++ b/TODO @@ -13,8 +13,6 @@ Interface - Tab font color when the file is modified or read only. - Test the application with a screen reader and add Atk objects where needed. -- Allow dropping of tabs and uri's inside the textview, menubar - and statusbar is already possible. - Cleanup the menus and make them consistent. For example: we're using both file and document atm. The name of the Go menu should also be changed to something more descriptive. diff --git a/mousepad/mousepad-document.c b/mousepad/mousepad-document.c index d7d7c1f..de38641 100644 --- a/mousepad/mousepad-document.c +++ b/mousepad/mousepad-document.c @@ -65,6 +65,14 @@ static void mousepad_document_notify_cursor_position (GtkTextBuffer static void mousepad_document_toggle_overwrite(GtkTextView *textview, GParamSpec *pspec, MousepadDocument *document); +static void mousepad_document_drag_data_received (GtkWidget *widget, +GdkDragContext *context, +gint x, +gint y, +GtkSelectionData *selection_data, +guint info, +guint time, +MousepadDocument *document); static void mousepad_document_scroll_to_visible_area (MousepadDocument *document); static gboolean mousepad_document_iter_search (const GtkTextIter *start, const gchar *str, @@ -235,6 +243,8 @@ mousepad_document_class_init (MousepadDocumentClass *klass) static void mousepad_document_init (MousepadDocument *document) { + GtkTargetList *target_list; + /* initialize the variables */ document-filename = NULL; document-display_name = NULL; @@ -266,17 +276,17 @@ mousepad_document_init (MousepadDocument *document) gtk_container_add (GTK_CONTAINER (document), GTK_WIDGET (document-textview)); gtk_widget_show (GTK_WIDGET (document-textview)); + /* also allow dropping of uris and tabs in the textview */ + target_list = gtk_drag_dest_get_target_list (GTK_WIDGET (document-textview)); + gtk_target_list_add_table (target_list, drop_targets, G_N_ELEMENTS (drop_targets)); + /* attach signals to the text view and buffer */ - g_signal_connect (G_OBJECT (document-buffer), modified-changed, -G_CALLBACK (mousepad_document_modified_changed), document); - g_signal_connect (G_OBJECT (document-buffer), notify::has-selection, -G_CALLBACK (mousepad_document_notify_has_selection), document); - g_signal_connect (G_OBJECT
[Xfce4-commits] mousepad:master * mousepad/mousepad-window.c: Rename function so it matches the standard mousepad_window_* names.
Updating branch refs/heads/master to a4f297b08aa19d2aa06c969d821af3590a231a2a (commit) from 9fbd9fdc5d6123223d4ffe75a3407f44425c9548 (commit) commit a4f297b08aa19d2aa06c969d821af3590a231a2a Author: Nick Schermer n...@xfce.org Date: Tue May 8 17:17:37 2007 + * mousepad/mousepad-window.c: Rename function so it matches the standard mousepad_window_* names. (Old svn revision: 25688) ChangeLog |5 + mousepad/mousepad-window.c | 10 +- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index 2ccec85..ea45543 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,4 +1,9 @@ 2007-05-08 Nick Schermer n...@xfce.org + * mousepad/mousepad-window.c: Rename function so it matches + the standard mousepad_window_* names. + + +2007-05-08 Nick Schermer n...@xfce.org * mousepad/mousepad-window.c: Open a new tab when the notebook is double clicked. Also fix some indentation. diff --git a/mousepad/mousepad-window.c b/mousepad/mousepad-window.c index 54455b3..4f50997 100644 --- a/mousepad/mousepad-window.c +++ b/mousepad/mousepad-window.c @@ -116,7 +116,7 @@ static void mousepad_window_tab_popup_position (GtkMenu gint *y, gboolean *push_in, gpointeruser_data); -static gboolean mousepad_notebook_button_press_event (GtkNotebook*notebook, +static gboolean mousepad_window_notebook_button_press_event (GtkNotebook*notebook, GdkEventButton *event, MousepadWindow *window); @@ -560,7 +560,7 @@ mousepad_window_init (MousepadWindow *window) g_signal_connect (G_OBJECT (window-notebook), page-reordered, G_CALLBACK (mousepad_window_page_reordered), window); g_signal_connect (G_OBJECT (window-notebook), page-added, G_CALLBACK (mousepad_window_page_added), window); g_signal_connect (G_OBJECT (window-notebook), page-removed, G_CALLBACK (mousepad_window_page_removed), window); - g_signal_connect (G_OBJECT (window-notebook), button-press-event, G_CALLBACK (mousepad_notebook_button_press_event), window); + g_signal_connect (G_OBJECT (window-notebook), button-press-event, G_CALLBACK (mousepad_window_notebook_button_press_event), window); /* append and show the notebook */ gtk_table_attach (GTK_TABLE (window-table), window-notebook, 0, 1, 3, 4, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0); @@ -1350,9 +1350,9 @@ mousepad_window_tab_popup_position (GtkMenu *menu, static gboolean -mousepad_notebook_button_press_event (GtkNotebook*notebook, - GdkEventButton *event, - MousepadWindow *window) +mousepad_window_notebook_button_press_event (GtkNotebook*notebook, + GdkEventButton *event, + MousepadWindow *window) { GtkWidget *page, *label; GtkWidget *menu; ___ Xfce4-commits mailing list Xfce4-commits@xfce.org https://mail.xfce.org/mailman/listinfo/xfce4-commits
[Xfce4-commits] mousepad:master * mousepad/mousepad-window.c: Open a new tab when the notebook is double clicked. Also fix some indentation.
Updating branch refs/heads/master to 9fbd9fdc5d6123223d4ffe75a3407f44425c9548 (commit) from 932f662654e9f024422e8fd806a8b9b90cc6149a (commit) commit 9fbd9fdc5d6123223d4ffe75a3407f44425c9548 Author: Nick Schermer n...@xfce.org Date: Tue May 8 17:14:34 2007 + * mousepad/mousepad-window.c: Open a new tab when the notebook is double clicked. Also fix some indentation. (Old svn revision: 25687) ChangeLog |5 +++ mousepad/mousepad-window.c | 86 +--- 2 files changed, 54 insertions(+), 37 deletions(-) diff --git a/ChangeLog b/ChangeLog index d34ab82..2ccec85 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2007-05-08 Nick Schermer n...@xfce.org + * mousepad/mousepad-window.c: Open a new tab when the notebook + is double clicked. Also fix some indentation. + + 2007-05-01 Nick Schermer n...@xfce.org * configure.in.in: Don't break on a broken glibc. diff --git a/mousepad/mousepad-window.c b/mousepad/mousepad-window.c index 827643d..54455b3 100644 --- a/mousepad/mousepad-window.c +++ b/mousepad/mousepad-window.c @@ -116,7 +116,7 @@ static void mousepad_window_tab_popup_position (GtkMenu gint *y, gboolean *push_in, gpointeruser_data); -static gboolean mousepad_window_tab_popup (GtkNotebook*notebook, +static gboolean mousepad_notebook_button_press_event (GtkNotebook*notebook, GdkEventButton *event, MousepadWindow *window); @@ -560,7 +560,7 @@ mousepad_window_init (MousepadWindow *window) g_signal_connect (G_OBJECT (window-notebook), page-reordered, G_CALLBACK (mousepad_window_page_reordered), window); g_signal_connect (G_OBJECT (window-notebook), page-added, G_CALLBACK (mousepad_window_page_added), window); g_signal_connect (G_OBJECT (window-notebook), page-removed, G_CALLBACK (mousepad_window_page_removed), window); - g_signal_connect (G_OBJECT (window-notebook), button-press-event, G_CALLBACK (mousepad_window_tab_popup), window); + g_signal_connect (G_OBJECT (window-notebook), button-press-event, G_CALLBACK (mousepad_notebook_button_press_event), window); /* append and show the notebook */ gtk_table_attach (GTK_TABLE (window-table), window-notebook, 0, 1, 3, 4, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0); @@ -1347,49 +1347,61 @@ mousepad_window_tab_popup_position (GtkMenu *menu, *push_in = TRUE; } + + static gboolean -mousepad_window_tab_popup (GtkNotebook*notebook, - GdkEventButton *event, - MousepadWindow *window) +mousepad_notebook_button_press_event (GtkNotebook*notebook, + GdkEventButton *event, + MousepadWindow *window) { GtkWidget *page, *label; GtkWidget *menu; guint page_num = 0; gint x_root; + _mousepad_return_if_fail (MOUSEPAD_IS_WINDOW (window)); + if (event-type == GDK_BUTTON_PRESS event-button == 3) - { -/* walk through the tabs and look for the tab under the cursor */ -while ((page = gtk_notebook_get_nth_page (notebook, page_num)) != NULL) - { -label = gtk_notebook_get_tab_label (notebook, page); - -/* get the origin of the label */ -gdk_window_get_origin (label-window, x_root, NULL); -x_root = x_root + label-allocation.x; - -/* check if the cursor is inside this label */ -if (event-x_root = x_root event-x_root = (x_root + label-allocation.width)) - { -/* switch to this tab */ -gtk_notebook_set_current_page (notebook, page_num); - -/* get the menu */ -menu = gtk_ui_manager_get_widget (window-ui_manager, /tab-menu); - -/* show it */ -gtk_menu_popup (GTK_MENU (menu), NULL, NULL, -mousepad_window_tab_popup_position, label, -event-button, event-time); - -/* we succeed */ -return TRUE; - } - -/* try the next tab */ -++page_num; - } - } +{ + /* walk through the tabs and look for the tab under the cursor */ + while ((page = gtk_notebook_get_nth_page (notebook, page_num)) != NULL) +{ + label = gtk_notebook_get_tab_label (notebook, page); + + /* get the origin of the label */ + gdk_window_get_origin (label-window, x_root, NULL); +
[Xfce4-commits] mousepad:master * mousepad/mousepad-undo.c: Don't store a string (or even prepend it in a GString) when the user is inserting text. This saves a whole bunch of relocations (Bug #2737
Updating branch refs/heads/master to 23c7b01c285078e6346e1b65afcb611273ce3c2f (commit) from a4f297b08aa19d2aa06c969d821af3590a231a2a (commit) commit 23c7b01c285078e6346e1b65afcb611273ce3c2f Author: Nick Schermer n...@xfce.org Date: Thu May 10 16:13:39 2007 + * mousepad/mousepad-undo.c: Don't store a string (or even prepend it in a GString) when the user is inserting text. This saves a whole bunch of relocations (Bug #2737). We also flush the insert buffer after a redo and don't copy strings when inverting a delete step. This should bring the memory usage of the undo manager to a minimum. * TODO: Add some undo manager reminders. * mousepad/mousepad-window.c: Fix compiler warning when debugging is enabled. * mousepad/mousepad-application.c: Change from append to prepend. (Old svn revision: 25700) ChangeLog | 14 +++ TODO|9 +++ mousepad/mousepad-application.c |2 +- mousepad/mousepad-undo.c| 50 +- mousepad/mousepad-window.c |2 +- 5 files changed, 63 insertions(+), 14 deletions(-) diff --git a/ChangeLog b/ChangeLog index ea45543..f82103a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,17 @@ +2007-05-10 Nick Schermer n...@xfce.org + * mousepad/mousepad-undo.c: Don't store a string (or even + prepend it in a GString) when the user is inserting text. + This saves a whole bunch of relocations (Bug #2737). We also + flush the insert buffer after a redo and don't copy strings + when inverting a delete step. This should bring the memory + usage of the undo manager to a minimum. + * TODO: Add some undo manager reminders. + * mousepad/mousepad-window.c: Fix compiler warning when + debugging is enabled. + * mousepad/mousepad-application.c: Change from append to + prepend. + + 2007-05-08 Nick Schermer n...@xfce.org * mousepad/mousepad-window.c: Rename function so it matches the standard mousepad_window_* names. diff --git a/TODO b/TODO index fe0db97..8f30a10 100644 --- a/TODO +++ b/TODO @@ -35,6 +35,15 @@ Text View - Maybe a match whole word option. +Undo Manager + +- Replace g_list_append with g_list_prepend in the undo manager. See + glib manual why. +- We erase the GString in the undo manager, but this buffer will be + (very) large when a large bunch of text is deleted. Maybe not a big + problem, but we could shrink it after erasing. + + Saving and loading == - Save All option. diff --git a/mousepad/mousepad-application.c b/mousepad/mousepad-application.c index 7054862..dcb0bc9 100644 --- a/mousepad/mousepad-application.c +++ b/mousepad/mousepad-application.c @@ -204,7 +204,7 @@ mousepad_application_take_window (MousepadApplication *application, g_signal_connect (G_OBJECT (window), destroy, G_CALLBACK (mousepad_application_window_destroyed), application); /* add the window to our internal list */ - application-windows = g_slist_append (application-windows, window); + application-windows = g_slist_prepend (application-windows, window); } diff --git a/mousepad/mousepad-undo.c b/mousepad/mousepad-undo.c index 3fa6fba..1477bf2 100644 --- a/mousepad/mousepad-undo.c +++ b/mousepad/mousepad-undo.c @@ -272,6 +272,10 @@ mousepad_undo_preform_step (MousepadUndo *undo, /* get the end iter */ gtk_text_buffer_get_iter_at_offset (undo-buffer, end_iter, info-end); +/* set the string */ +if (info-string == NULL) + info-string = gtk_text_buffer_get_slice (undo-buffer, start_iter, end_iter, TRUE); + /* delete the inserted text */ gtk_text_buffer_delete (undo-buffer, start_iter, end_iter); @@ -281,6 +285,14 @@ mousepad_undo_preform_step (MousepadUndo *undo, /* insert the deleted text */ gtk_text_buffer_insert (undo-buffer, start_iter, info-string, -1); +/* cleanup the buffer if the user did a redo step (so an inverted insert step) */ +if (!undo_step) + { +/* free and reset */ +g_free (info-string); +info-string = NULL; + } + break; default: @@ -295,7 +307,7 @@ mousepad_undo_preform_step (MousepadUndo *undo, undo-steps_position++; } - /* set the can_undo boolean */ + /* whether we can undo and redo */ undo-can_undo = (undo-steps_position 0); undo-can_redo = (undo-steps_position g_list_length (undo-steps)); @@ -338,10 +350,17 @@ mousepad_undo_new_step (MousepadUndo *undo) /* allocate a new slice */ info = g_slice_new0 (MousepadUndoInfo); -/* copy the data from the existing step */ -info-string = g_strdup
[Xfce4-commits] mousepad:master * mousepad/mousepad-window.c: Jump to active file when opening a new document.
Updating branch refs/heads/master to d2c3c1f88384b617269bcd129f6cce6a86b5efa2 (commit) from 23c7b01c285078e6346e1b65afcb611273ce3c2f (commit) commit d2c3c1f88384b617269bcd129f6cce6a86b5efa2 Author: Nick Schermer n...@xfce.org Date: Sat May 12 15:41:04 2007 + * mousepad/mousepad-window.c: Jump to active file when opening a new document. (Old svn revision: 25707) ChangeLog |5 + mousepad/mousepad-window.c | 18 +++--- 2 files changed, 20 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index f82103a..d2260c1 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2007-05-12 Nick Schermer n...@xfce.org + * mousepad/mousepad-window.c: Jump to active file when + opening a new document. + + 2007-05-10 Nick Schermer n...@xfce.org * mousepad/mousepad-undo.c: Don't store a string (or even prepend it in a GString) when the user is inserting text. diff --git a/mousepad/mousepad-window.c b/mousepad/mousepad-window.c index d981df2..df6ce1f 100644 --- a/mousepad/mousepad-window.c +++ b/mousepad/mousepad-window.c @@ -2142,9 +2142,10 @@ static void mousepad_window_action_open_file (GtkAction *action, MousepadWindow *window) { - GtkWidget *chooser; - gchar *filename; - GSList*filenames, *li; + GtkWidget *chooser; + gchar *filename; + const gchar *active_filename; + GSList *filenames, *li; /* create new chooser dialog */ chooser = gtk_file_chooser_dialog_new (_(Open File), @@ -2157,6 +2158,17 @@ mousepad_window_action_open_file (GtkAction *action, gtk_file_chooser_set_local_only (GTK_FILE_CHOOSER (chooser), TRUE); gtk_file_chooser_set_select_multiple (GTK_FILE_CHOOSER (chooser), TRUE); + /* open the folder of the currently opened file */ + if (window-active) +{ + /* get the filename of the active document */ + active_filename = mousepad_document_get_filename (window-active); + + /* set the current filename, if there is one */ + if (active_filename) +gtk_file_chooser_set_filename (GTK_FILE_CHOOSER (chooser), active_filename); +} + /* run the dialog */ if (G_LIKELY (gtk_dialog_run (GTK_DIALOG (chooser)) == GTK_RESPONSE_ACCEPT)) { ___ Xfce4-commits mailing list Xfce4-commits@xfce.org https://mail.xfce.org/mailman/listinfo/xfce4-commits
[Xfce4-commits] mousepad:master * mousepad/mousepad-window.c: Add extra tests if the file really exists, because Gtk file dialogs hang if the file does not exists.
Updating branch refs/heads/master to 4abd78f00bd8306fd7a8028875cb9050b62df53e (commit) from d2c3c1f88384b617269bcd129f6cce6a86b5efa2 (commit) commit 4abd78f00bd8306fd7a8028875cb9050b62df53e Author: Nick Schermer n...@xfce.org Date: Sat May 12 16:38:47 2007 + * mousepad/mousepad-window.c: Add extra tests if the file really exists, because Gtk file dialogs hang if the file does not exists. (Old svn revision: 25708) ChangeLog |6 ++ mousepad/mousepad-private.h |1 + mousepad/mousepad-window.c |8 +++- 3 files changed, 14 insertions(+), 1 deletions(-) diff --git a/ChangeLog b/ChangeLog index d2260c1..c5c1855 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,4 +1,10 @@ 2007-05-12 Nick Schermer n...@xfce.org + * mousepad/mousepad-window.c: Add extra tests if the file + really exists, because Gtk file dialogs hang if the + file does not exists. + + +2007-05-12 Nick Schermer n...@xfce.org * mousepad/mousepad-window.c: Jump to active file when opening a new document. diff --git a/mousepad/mousepad-private.h b/mousepad/mousepad-private.h index b70e0de..ce7fafe 100644 --- a/mousepad/mousepad-private.h +++ b/mousepad/mousepad-private.h @@ -21,6 +21,7 @@ #ifndef __MOUSEPAD_PRIVATE_H__ #define __MOUSEPAD_PRIVATE_H__ +#include glib.h #include glib-object.h #include gtk/gtk.h #include libxfce4util/libxfce4util.h diff --git a/mousepad/mousepad-window.c b/mousepad/mousepad-window.c index df6ce1f..5b21c0a 100644 --- a/mousepad/mousepad-window.c +++ b/mousepad/mousepad-window.c @@ -32,6 +32,8 @@ #include unistd.h #endif +#include glib/gstdio.h + #include mousepad/mousepad-private.h #include mousepad/mousepad-types.h #include mousepad/mousepad-application.h @@ -927,6 +929,10 @@ mousepad_window_save (MousepadWindow *window, /* get the current filename */ filename = mousepad_document_get_filename (document); + + /* check if the file really exists */ + if (g_file_test (filename, G_FILE_TEST_EXISTS) == FALSE) +filename = NULL; if (force_save_as || filename == NULL) { @@ -2165,7 +2171,7 @@ mousepad_window_action_open_file (GtkAction *action, active_filename = mousepad_document_get_filename (window-active); /* set the current filename, if there is one */ - if (active_filename) + if (active_filename g_file_test (active_filename, G_FILE_TEST_EXISTS)) gtk_file_chooser_set_filename (GTK_FILE_CHOOSER (chooser), active_filename); } ___ Xfce4-commits mailing list Xfce4-commits@xfce.org https://mail.xfce.org/mailman/listinfo/xfce4-commits
[Xfce4-commits] mousepad:master * mousepad/Makefile.am: Use the new exo-csource --strip-comments and --strip-content arguments.
Updating branch refs/heads/master to 0f9ccf029632a9bb61f393243c1153fb58dd5793 (commit) from b408c7b5f735db6c91e3381953e6c5cfca967901 (commit) commit 0f9ccf029632a9bb61f393243c1153fb58dd5793 Author: Nick Schermer n...@xfce.org Date: Sun May 20 12:13:07 2007 + * mousepad/Makefile.am: Use the new exo-csource --strip-comments and --strip-content arguments. (Old svn revision: 25729) ChangeLog|5 + mousepad/Makefile.am |2 +- 2 files changed, 6 insertions(+), 1 deletions(-) diff --git a/ChangeLog b/ChangeLog index 51a7ff2..66929ca 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,4 +1,9 @@ 2007-05-20 Nick Schermer n...@xfce.org + * mousepad/Makefile.am: Use the new exo-csource + --strip-comments and --strip-content arguments. + + +2007-05-20 Nick Schermer n...@xfce.org * mousepad/mousepad-view.c: Initialize variables, so gcc is happy. * README: Add some lines. diff --git a/mousepad/Makefile.am b/mousepad/Makefile.am index 9ec9015..68f49f9 100644 --- a/mousepad/Makefile.am +++ b/mousepad/Makefile.am @@ -116,7 +116,7 @@ mousepad-dbus-infos.h: $(srcdir)/mousepad-dbus-infos.xml Makefile endif mousepad-window-ui.h: Makefile $(srcdir)/mousepad-window-ui.xml - exo-csource --static --name=mousepad_window_ui $(srcdir)/mousepad-window-ui.xml mousepad-window-ui.h + exo-csource --strip-comments --strip-content --static --name=mousepad_window_ui $(srcdir)/mousepad-window-ui.xml mousepad-window-ui.h mousepad-enum-types.h: stamp-mousepad-enum-types.h @true ___ Xfce4-commits mailing list Xfce4-commits@xfce.org https://mail.xfce.org/mailman/listinfo/xfce4-commits
[Xfce4-commits] mousepad:master * mousepad/mousepad-view.c: Initialize variables, so gcc is happy. * README: Add some lines. * mousepad/mousepad-window.c: Ctrl + Shift + v is the shortcut to paste i
Updating branch refs/heads/master to b408c7b5f735db6c91e3381953e6c5cfca967901 (commit) from 924ec4cfdac8ef8ad541d643f9789836bb3bd86c (commit) commit b408c7b5f735db6c91e3381953e6c5cfca967901 Author: Nick Schermer n...@xfce.org Date: Sun May 20 09:58:48 2007 + * mousepad/mousepad-view.c: Initialize variables, so gcc is happy. * README: Add some lines. * mousepad/mousepad-window.c: Ctrl + Shift + v is the shortcut to paste in a column. (Old svn revision: 25726) ChangeLog | 10 +- README | 44 mousepad/mousepad-view.c |4 ++-- mousepad/mousepad-window.c |2 +- 4 files changed, 56 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index 326ead6..51a7ff2 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,4 +1,12 @@ -2007-05-xx Nick Schermer n...@xfce.org +2007-05-20 Nick Schermer n...@xfce.org + * mousepad/mousepad-view.c: Initialize variables, so gcc is + happy. + * README: Add some lines. + * mousepad/mousepad-window.c: Ctrl + Shift + v is the shortcut + to paste in a column. + + +2007-05-17 Nick Schermer n...@xfce.org * mousepad/mousepad-view.c: Cleanup the line number code. This version is a bit faster and removed a bunch of code. * mousepad/mousepad-view.c: Cleanup the indentation code. You diff --git a/README b/README index e69de29..839b458 100644 --- a/README +++ b/README @@ -0,0 +1,44 @@ +What is it? +=== + +Mousepad is a simple text editor for the Xfce desktop environment. + + +The Mousepad Mission + + +Mousepad aims to be an easy-to-use and fast editor. Our target is an +editor for quickly editing text files, not a development environment +or an editor with a huge bunch of plugins. +On the other hand we try to use the latest Gtk+ features available, +which means that if Gtk adds something new in a major release that is +useful for the editor, we will likely bump the Gtk dependency and +integrate this new feature in Mousepad. + + +Required packages += + +Mousepad depends on the following packages: + + - Gtk+ 2.10.0 or above + - Libxfce4util 4.4.0 or above + +The following packages are optional: + + - D-BUS 0.34 or above (strongly suggested) + + +Installation + + +The file 'INSTALL' contains generic installation +instructions. + + +How to report bugs? +=== + +Bugs should be reported to the Xfce bug tracking system +(http://bugzilla.xfce.org, product Mousepad). You will need to create +an account for yourself. diff --git a/mousepad/mousepad-view.c b/mousepad/mousepad-view.c index a00d8e6..9f606b0 100644 --- a/mousepad/mousepad-view.c +++ b/mousepad/mousepad-view.c @@ -876,9 +876,9 @@ mousepad_view_handle_clipboard (MousepadView *view, GtkClipboard *clipboard, gboolean remove) { - GString *string; + GString *string = NULL; gint i; - gint ln, previous_ln; + gint ln, previous_ln = 0; gchar *slice; GtkTextBuffer *buffer; GtkTextMark *mark_start, *mark_end; diff --git a/mousepad/mousepad-window.c b/mousepad/mousepad-window.c index 76e6b1b..ef68183 100644 --- a/mousepad/mousepad-window.c +++ b/mousepad/mousepad-window.c @@ -329,7 +329,7 @@ static const GtkActionEntry action_entries[] = { cut, GTK_STOCK_CUT, NULL, NULL, N_(Cut the selection), G_CALLBACK (mousepad_window_action_cut), }, { copy, GTK_STOCK_COPY, NULL, NULL, N_(Copy the selection), G_CALLBACK (mousepad_window_action_copy), }, { paste, GTK_STOCK_PASTE, NULL, NULL, N_(Paste the clipboard), G_CALLBACK (mousepad_window_action_paste), }, -{ paste-column, NULL, N_(Paste _Column), NULL, N_(Paste the clipboard text in a clumn), G_CALLBACK (mousepad_window_action_paste_column), }, +{ paste-column, GTK_STOCK_PASTE, N_(Paste _Column), controlshiftV, N_(Paste the clipboard text in a clumn), G_CALLBACK (mousepad_window_action_paste_column), }, { delete, GTK_STOCK_DELETE, NULL, NULL, N_(Delete the selected text), G_CALLBACK (mousepad_window_action_delete), }, { select-all, GTK_STOCK_SELECT_ALL, NULL, NULL, N_(Select the entire document), G_CALLBACK (mousepad_window_action_select_all), }, ___ Xfce4-commits mailing list Xfce4-commits@xfce.org https://mail.xfce.org/mailman/listinfo/xfce4-commits
[Xfce4-commits] mousepad:master * mousepad/mousepad-{preferences, search-bar, document}.c, mousepad/mousepad-types.h: Add match whole word option.
Updating branch refs/heads/master to c0bf115da5b4dd9ca9be101014e41565ffdeae1c (commit) from 0f9ccf029632a9bb61f393243c1153fb58dd5793 (commit) commit c0bf115da5b4dd9ca9be101014e41565ffdeae1c Author: Nick Schermer n...@xfce.org Date: Sun May 20 18:44:10 2007 + * mousepad/mousepad-{preferences,search-bar,document}.c, mousepad/mousepad-types.h: Add match whole word option. (Old svn revision: 25736) ChangeLog |5 ++ mousepad/mousepad-document.c| 24 - mousepad/mousepad-preferences.c | 19 +++- mousepad/mousepad-search-bar.c | 102 --- mousepad/mousepad-types.h |1 + 5 files changed, 130 insertions(+), 21 deletions(-) diff --git a/ChangeLog b/ChangeLog index 66929ca..d1d2fb6 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,4 +1,9 @@ 2007-05-20 Nick Schermer n...@xfce.org + * mousepad/mousepad-{preferences,search-bar,document}.c, + mousepad/mousepad-types.h: Add match whole word option. + + +2007-05-20 Nick Schermer n...@xfce.org * mousepad/Makefile.am: Use the new exo-csource --strip-comments and --strip-content arguments. diff --git a/mousepad/mousepad-document.c b/mousepad/mousepad-document.c index 6c92296..b446d29 100644 --- a/mousepad/mousepad-document.c +++ b/mousepad/mousepad-document.c @@ -750,11 +750,28 @@ mousepad_document_iter_search (const GtkTextIter *start, /* we've hit the end of the search string, so we had a full match */ if (G_UNLIKELY (*str == '\0')) { - /* forward one character */ if (G_LIKELY (search_forward)) -gtk_text_iter_forward_char (iter); +{ + /* forward one character */ + gtk_text_iter_forward_char (iter); + + /* check if we match a whole word */ + if (flags MOUSEPAD_SEARCH_WHOLE_WORD + !(gtk_text_iter_starts_word (begin) +gtk_text_iter_ends_word (iter))) +goto reset_match; +} else -gtk_text_iter_forward_char (begin); +{ + /* 'backward' one character */ + gtk_text_iter_forward_char (begin); + + /* check if we match a whole word */ + if (flags MOUSEPAD_SEARCH_WHOLE_WORD + !(gtk_text_iter_starts_word (iter) +gtk_text_iter_ends_word (begin))) +goto reset_match; +} /* set the start and end iters */ *match_start = begin; @@ -767,6 +784,7 @@ mousepad_document_iter_search (const GtkTextIter *start, } else if (G_UNLIKELY (str_offset 0)) { + reset_match: /* go back to the first character in the string */ for (;str_offset 0; str_offset--) str = g_utf8_prev_char (str); diff --git a/mousepad/mousepad-preferences.c b/mousepad/mousepad-preferences.c index a602057..e7070ca 100644 --- a/mousepad/mousepad-preferences.c +++ b/mousepad/mousepad-preferences.c @@ -52,6 +52,7 @@ enum PROP_LAST_AUTO_INDENT, PROP_LAST_LINE_NUMBERS, PROP_LAST_MATCH_CASE, + PROP_LAST_MATCH_WHOLE_WORD, PROP_LAST_STATUSBAR_VISIBLE, PROP_LAST_WINDOW_HEIGHT, PROP_LAST_WINDOW_WIDTH, @@ -232,6 +233,19 @@ mousepad_preferences_class_init (MousepadPreferencesClass *klass) FALSE, MOUSEPAD_PARAM_READWRITE)); +/** + * MousepadPreferences:last-match-whole-word + * + * Whether to enable match case in the search bar. + **/ + g_object_class_install_property (gobject_class, + PROP_LAST_MATCH_WHOLE_WORD, + g_param_spec_boolean (last-match-whole-word, + last-match-whole-word, + last-match-whole-word, + FALSE, + MOUSEPAD_PARAM_READWRITE)); + /** * MousepadPreferences:last-statusbar-visible * @@ -432,7 +446,10 @@ mousepad_preferences_set_property (GObject *object, dst = preferences-values + prop_id; if (G_UNLIKELY (!G_IS_VALUE (dst))) -g_value_init (dst, pspec-value_type); +{ + g_value_init (dst, pspec-value_type); + g_param_value_set_default (pspec, dst); +} if (g_param_values_cmp (pspec, value, dst) != 0) { diff --git a/mousepad/mousepad-search-bar.c b/mousepad/mousepad-search-bar.c index 2804684..65948eb 100644 --- a/mousepad/mousepad-search-bar.c +++ b/mousepad/mousepad-search-bar.c @@ -53,8 +53,12 @@ static void
[Xfce4-commits] mousepad:master * *.*: Remove copyright lines.
Updating branch refs/heads/master to 772eeca118e48c94c5fe908c333197b3b6b8845e (commit) from c0bf115da5b4dd9ca9be101014e41565ffdeae1c (commit) commit 772eeca118e48c94c5fe908c333197b3b6b8845e Author: Nick Schermer n...@xfce.org Date: Tue May 22 19:50:01 2007 + * *.*: Remove copyright lines. (Old svn revision: 25747) ChangeLog|4 autogen.sh |3 --- configure.in.in |4 mousepad/main.c |2 -- mousepad/mousepad-application.c |2 -- mousepad/mousepad-application.h |2 -- mousepad/mousepad-dbus-infos.xml |2 -- mousepad/mousepad-dbus.c |3 --- mousepad/mousepad-dbus.h |2 -- mousepad/mousepad-dialogs.c |2 -- mousepad/mousepad-dialogs.h |2 -- mousepad/mousepad-document.c |2 -- mousepad/mousepad-document.h |2 -- mousepad/mousepad-file.c |2 -- mousepad/mousepad-file.h |2 -- mousepad/mousepad-preferences.c |3 --- mousepad/mousepad-preferences.h |2 -- mousepad/mousepad-private.h |3 --- mousepad/mousepad-search-bar.c |2 -- mousepad/mousepad-search-bar.h |2 -- mousepad/mousepad-statusbar.c|2 -- mousepad/mousepad-statusbar.h|2 -- mousepad/mousepad-types.h|4 +--- mousepad/mousepad-undo.c |2 -- mousepad/mousepad-undo.h |2 -- mousepad/mousepad-view.c |2 -- mousepad/mousepad-view.h |2 -- mousepad/mousepad-window-ui.xml | 14 +- mousepad/mousepad-window.c |3 --- mousepad/mousepad-window.h |2 -- 30 files changed, 18 insertions(+), 65 deletions(-) diff --git a/ChangeLog b/ChangeLog index d1d2fb6..0f46b2b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2007-05-22 Nick Schermer n...@xfce.org + * *.*: Remove copyright lines. + + 2007-05-20 Nick Schermer n...@xfce.org * mousepad/mousepad-{preferences,search-bar,document}.c, mousepad/mousepad-types.h: Add match whole word option. diff --git a/autogen.sh b/autogen.sh index ef7bfb2..e8fcaae 100755 --- a/autogen.sh +++ b/autogen.sh @@ -2,9 +2,6 @@ # # $Id$ # -# Copyright (c) 2007 -# The Xfce development team. All rights reserved. -# (type xdt-autogen) /dev/null 21 || { cat 2 EOF diff --git a/configure.in.in b/configure.in.in index 45f0892..671b455 100644 --- a/configure.in.in +++ b/configure.in.in @@ -1,8 +1,4 @@ dnl $Id$ -dnl -dnl Copyright (c) 2007 -dnl The Xfce development team. All rights reserved. -dnl dnl *** dnl *** Version information *** diff --git a/mousepad/main.c b/mousepad/main.c index 9f339de..7c930e1 100644 --- a/mousepad/main.c +++ b/mousepad/main.c @@ -1,7 +1,5 @@ /* $Id$ */ /* - * Copyright (c) 2007 Nick Schermer n...@xfce.org - * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the Free * Software Foundation; either version 2 of the License, or (at your option) diff --git a/mousepad/mousepad-application.c b/mousepad/mousepad-application.c index dcb0bc9..de0b8b7 100644 --- a/mousepad/mousepad-application.c +++ b/mousepad/mousepad-application.c @@ -1,7 +1,5 @@ /* $Id$ */ /* - * Copyright (c) 2007 Nick Schermer n...@xfce.org - * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the Free * Software Foundation; either version 2 of the License, or (at your option) diff --git a/mousepad/mousepad-application.h b/mousepad/mousepad-application.h index 0b18964..9af3941 100644 --- a/mousepad/mousepad-application.h +++ b/mousepad/mousepad-application.h @@ -1,7 +1,5 @@ /* $Id$ */ /* - * Copyright (c) 2007 Nick Schermer n...@xfce.org - * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the Free * Software Foundation; either version 2 of the License, or (at your option) diff --git a/mousepad/mousepad-dbus-infos.xml b/mousepad/mousepad-dbus-infos.xml index 1182a5e..c356bb9 100644 --- a/mousepad/mousepad-dbus-infos.xml +++ b/mousepad/mousepad-dbus-infos.xml @@ -3,8 +3,6 @@ !-- $Id$ - Copyright (c) 2007 Nick Schermer n...@xfce.org - This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) diff --git a/mousepad/mousepad-dbus.c b/mousepad/mousepad-dbus.c index 12760f3..e85389e 100644 --- a/mousepad/mousepad-dbus.c +++ b/mousepad/mousepad-dbus.c @@ -1,8 +1,5 @@ /* $Id$ */ /* - * Copyright (c) 2004-2007 Benedikt Meurer be...@xfce.org - * Copyright (c) 2007 Nick Schermer n...@xfce.org - * * This program is free
[Xfce4-commits] mousepad:master * Set Id property on files.
Updating branch refs/heads/master to 0c494023ae1504211afbba57c9c469e4955426dc (commit) from d1196e9f4486f9a5d4610fb88a1076a5e8d476a5 (commit) commit 0c494023ae1504211afbba57c9c469e4955426dc Author: Nick Schermer n...@xfce.org Date: Tue Oct 16 20:03:00 2007 + * Set Id property on files. (Old svn revision: 26135) ___ Xfce4-commits mailing list Xfce4-commits@xfce.org https://mail.xfce.org/mailman/listinfo/xfce4-commits
[Xfce4-commits] mousepad:master * Previous commit was a typo.
Updating branch refs/heads/master to 73fe06eded04e6c604a49caf443cf3cc7d22ddbf (commit) from 0c494023ae1504211afbba57c9c469e4955426dc (commit) commit 73fe06eded04e6c604a49caf443cf3cc7d22ddbf Author: Nick Schermer n...@xfce.org Date: Tue Oct 16 20:06:10 2007 + * Previous commit was a typo. (Old svn revision: 26136) mousepad/mousepad-print.h |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/mousepad/mousepad-print.h b/mousepad/mousepad-print.h index 84273db..45677b7 100644 --- a/mousepad/mousepad-print.h +++ b/mousepad/mousepad-print.h @@ -1,4 +1,4 @@ -/* $Id: mousepad-print.h 25747 2007-05-22 19:50:01Z nick $ */ +/* $Id$ */ /* * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the Free ___ Xfce4-commits mailing list Xfce4-commits@xfce.org https://mail.xfce.org/mailman/listinfo/xfce4-commits
[Xfce4-commits] mousepad:master * mousepad/mousepad-{window, util}.c: Fix compiler warnings.
Updating branch refs/heads/master to 8a4f2f2e71d3fa064295bbbe0ca4697e562878f3 (commit) from 73fe06eded04e6c604a49caf443cf3cc7d22ddbf (commit) commit 8a4f2f2e71d3fa064295bbbe0ca4697e562878f3 Author: Nick Schermer n...@xfce.org Date: Wed Oct 17 09:48:30 2007 + * mousepad/mousepad-{window,util}.c: Fix compiler warnings. (Old svn revision: 26140) ChangeLog |4 mousepad/mousepad-util.c |8 mousepad/mousepad-window.c |3 +++ 3 files changed, 11 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index 8c92023..213e47c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2007-10-17 Nick Schermer n...@xfce.org +* mousepad/mousepad-{window,util}.c: Fix compiler warnings. + + 2007-10-16 Nick Schermer n...@xfce.org * mousepad/mousepad-dialogs.c: Set the correct default return in the jump dialog. diff --git a/mousepad/mousepad-util.c b/mousepad/mousepad-util.c index 28316c8..1cd89e3 100644 --- a/mousepad/mousepad-util.c +++ b/mousepad/mousepad-util.c @@ -487,15 +487,15 @@ mousepad_util_search (GtkTextBuffer *buffer, mark_start = gtk_text_buffer_create_mark (buffer, NULL, start, TRUE); mark_iter = gtk_text_buffer_create_mark (buffer, NULL, iter, TRUE); mark_end = gtk_text_buffer_create_mark (buffer, NULL, end, TRUE); + + /* some to make the code easier to read */ + search_backwards = ((flags MOUSEPAD_SEARCH_FLAGS_DIR_BACKWARD) != 0); + wrap_around = ((flags MOUSEPAD_SEARCH_FLAGS_WRAP_AROUND) != 0 !gtk_text_iter_equal (start, iter)); /* if we're not really searching anything, reset the cursor */ if (string == NULL || *string == '\0') goto reset_cursor; - /* some to make the code easier to read */ - search_backwards = (flags MOUSEPAD_SEARCH_FLAGS_DIR_BACKWARD) != 0; - wrap_around = (flags MOUSEPAD_SEARCH_FLAGS_WRAP_AROUND) != 0 !gtk_text_iter_equal (start, iter); - if (search_backwards) { /* reverse the search string */ diff --git a/mousepad/mousepad-window.c b/mousepad/mousepad-window.c index 40246dc..e8f3605 100644 --- a/mousepad/mousepad-window.c +++ b/mousepad/mousepad-window.c @@ -1020,6 +1020,9 @@ mousepad_window_add (MousepadWindow *window, /* create the tab label */ label = mousepad_document_get_tab_label (document); + + /* get active page */ + page = gtk_notebook_get_current_page (GTK_NOTEBOOK (window-notebook)); /* insert the page right of the active tab */ page = gtk_notebook_insert_page (GTK_NOTEBOOK (window-notebook), GTK_WIDGET (document), label, page + 1); ___ Xfce4-commits mailing list Xfce4-commits@xfce.org https://mail.xfce.org/mailman/listinfo/xfce4-commits
[Xfce4-commits] mousepad:master * mousepad/mousepad-window.c: Decrease the menu lock when a window is closed and disconnect the recent manager handler (this is a bug since 2.12 because the manager i
Updating branch refs/heads/master to 2d17e63c32d75fb9fb7f98e8660b4980ec24af7d (commit) from 8a4f2f2e71d3fa064295bbbe0ca4697e562878f3 (commit) commit 2d17e63c32d75fb9fb7f98e8660b4980ec24af7d Author: Nick Schermer n...@xfce.org Date: Wed Oct 17 11:02:46 2007 + * mousepad/mousepad-window.c: Decrease the menu lock when a window is closed and disconnect the recent manager handler (this is a bug since 2.12 because the manager is a floating object). (Old svn revision: 26141) ChangeLog |6 ++ mousepad/mousepad-window.c | 24 ++-- 2 files changed, 20 insertions(+), 10 deletions(-) diff --git a/ChangeLog b/ChangeLog index 213e47c..d5e4762 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,4 +1,10 @@ 2007-10-17 Nick Schermer n...@xfce.org +* mousepad/mousepad-window.c: Decrease the menu lock when a window + is closed and disconnect the recent manager handler (this is a + bug since 2.12 because the manager is a floating object). + + +2007-10-17 Nick Schermer n...@xfce.org * mousepad/mousepad-{window,util}.c: Fix compiler warnings. diff --git a/mousepad/mousepad-window.c b/mousepad/mousepad-window.c index e8f3605..578582b 100644 --- a/mousepad/mousepad-window.c +++ b/mousepad/mousepad-window.c @@ -511,8 +511,7 @@ mousepad_window_init (MousepadWindow *window) window-recent_manager = gtk_recent_manager_get_default (); window-recent_actions = gtk_action_group_new (RecentActions); gtk_ui_manager_insert_action_group (window-ui_manager, window-recent_actions, -1); - g_signal_connect_swapped (G_OBJECT (window-recent_manager), changed, -G_CALLBACK (mousepad_window_recent_menu), window); + g_signal_connect_swapped (G_OBJECT (window-recent_manager), changed, G_CALLBACK (mousepad_window_recent_menu), window); /* create the recent menu */ mousepad_window_recent_menu (window); @@ -610,6 +609,9 @@ static void mousepad_window_dispose (GObject *object) { MousepadWindow *window = MOUSEPAD_WINDOW (object); + + /* disconnect recent manager signal */ + g_signal_handlers_disconnect_by_func (G_OBJECT (window-recent_manager), mousepad_window_recent_menu, window); /* destroy the save geometry timer source */ if (G_UNLIKELY (window-save_geometry_timer_id != 0)) @@ -1923,12 +1925,14 @@ mousepad_window_recent_menu_idle_destroy (gpointer user_data) static void mousepad_window_recent_menu (MousepadWindow *window) { + _mousepad_return_if_fail (MOUSEPAD_IS_WINDOW (window)); + /* leave when we're updating multiple files or there is this an idle function pending */ - if (lock_menu_updates window-update_recent_menu_id != 0) + if (lock_menu_updates 0 || window-update_recent_menu_id != 0) return; /* schedule a recent menu update */ - window-update_recent_menu_id = g_idle_add_full (G_PRIORITY_LOW, (GSourceFunc) mousepad_window_recent_menu_idle, + window-update_recent_menu_id = g_idle_add_full (G_PRIORITY_LOW, mousepad_window_recent_menu_idle, window, mousepad_window_recent_menu_idle_destroy); } @@ -2539,18 +2543,18 @@ mousepad_window_action_close (GtkAction *action, /* ask user what to do, break when he/she hits the cancel button */ if (!mousepad_window_close_document (window, MOUSEPAD_DOCUMENT (document))) -{ - /* allow updates again */ - lock_menu_updates--; - +{ /* update the go menu */ mousepad_window_update_gomenu (window); - /* leave the close function */ - return; + /* leave the loop */ + break; } } } + + /* allow updates again */ + lock_menu_updates--; /* window will close it self when it contains to tabs */ } ___ Xfce4-commits mailing list Xfce4-commits@xfce.org https://mail.xfce.org/mailman/listinfo/xfce4-commits
[Xfce4-commits] mousepad:master * mousepad/mousepad-utils.{c, h}: Add iter function to move the iter in front of text. Code used from one of the indentation functions. * mousepad/mousepad-view.c: Ad
Updating branch refs/heads/master to b01842db991e385a4a2373da1eaac1191197d9af (commit) from a75d9920d838e508c10dfd17908233d45dc20e6c (commit) commit b01842db991e385a4a2373da1eaac1191197d9af Author: Nick Schermer n...@xfce.org Date: Thu Oct 18 09:04:31 2007 + * mousepad/mousepad-utils.{c,h}: Add iter function to move the iter in front of text. Code used from one of the indentation functions. * mousepad/mousepad-view.c: Add code for a smart home button: when the cursor starts a line and the home button is pressed, it will move to the start of the text. * mousepad/mousepad-view.c: Key bindings Ctrl + {Home,End} to jump to the start and end of a document. (Old svn revision: 26144) ChangeLog| 18 -- mousepad/mousepad-util.c | 28 +++- mousepad/mousepad-util.h |3 ++ mousepad/mousepad-view.c | 80 + 4 files changed, 102 insertions(+), 27 deletions(-) diff --git a/ChangeLog b/ChangeLog index 26390f6..9ea6287 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,19 +1,29 @@ -2007-10-17 Nick Schermer n...@xfce.org +2007-10-18 Nick Schermer n...@xfce.org + * mousepad/mousepad-utils.{c,h}: Add iter function to move the iter + in front of text. Code used from one of the indentation functions. + * mousepad/mousepad-view.c: Add code for a smart home button: when + the cursor starts a line and the home button is pressed, it will + move to the start of the text. + * mousepad/mousepad-view.c: Key bindings Ctrl + {Home,End} to jump + to the start and end of a document. + + +2007-10-17 Nick Schermer n...@xfce.org * mousepad/mousepad-window.c: Cleanup some code and get rid of the multiple action groups. -2007-10-17 Nick Schermer n...@xfce.org +2007-10-17 Nick Schermer n...@xfce.org * mousepad/mousepad-window.c: Decrease the menu lock when a window is closed and disconnect the recent manager handler (this is a bug since 2.12 because the manager is a floating object). -2007-10-17 Nick Schermer n...@xfce.org +2007-10-17 Nick Schermer n...@xfce.org * mousepad/mousepad-{window,util}.c: Fix compiler warnings. -2007-10-16 Nick Schermer n...@xfce.org +2007-10-16 Nick Schermer n...@xfce.org * mousepad/mousepad-dialogs.c: Set the correct default return in the jump dialog. * mousepad/mousepad-replace-{dialog,window,preferences}.{c,h}: diff --git a/mousepad/mousepad-util.c b/mousepad/mousepad-util.c index 1cd89e3..61808e8 100644 --- a/mousepad/mousepad-util.c +++ b/mousepad/mousepad-util.c @@ -173,6 +173,32 @@ mousepad_util_get_real_line_offset (const GtkTextIter *iter, +gboolean +mousepad_util_forward_iter_to_text (GtkTextIter *iter, +const GtkTextIter *limit) +{ + gunichar c; + + do +{ + /* get the iter character */ + c = gtk_text_iter_get_char (iter); + + /* break if the character is not a space */ + if (!g_unichar_isspace (c) || c == '\n' || c == '\r') +break; + + /* break when we reached the limit iter */ + if (limit gtk_text_iter_equal (iter, limit)) +return FALSE; +} + while (gtk_text_iter_forward_char (iter)); + + return TRUE; +} + + + GType mousepad_util_search_flags_get_type (void) { @@ -487,7 +513,7 @@ mousepad_util_search (GtkTextBuffer *buffer, mark_start = gtk_text_buffer_create_mark (buffer, NULL, start, TRUE); mark_iter = gtk_text_buffer_create_mark (buffer, NULL, iter, TRUE); mark_end = gtk_text_buffer_create_mark (buffer, NULL, end, TRUE); - + /* some to make the code easier to read */ search_backwards = ((flags MOUSEPAD_SEARCH_FLAGS_DIR_BACKWARD) != 0); wrap_around = ((flags MOUSEPAD_SEARCH_FLAGS_WRAP_AROUND) != 0 !gtk_text_iter_equal (start, iter)); diff --git a/mousepad/mousepad-util.h b/mousepad/mousepad-util.h index 4f3f575..cbb686e 100644 --- a/mousepad/mousepad-util.h +++ b/mousepad/mousepad-util.h @@ -75,6 +75,9 @@ void mousepad_util_set_tooltip(GtkWidget *widget, gint mousepad_util_get_real_line_offset (const GtkTextIter *iter, gint tab_width); +gboolean mousepad_util_forward_iter_to_text (GtkTextIter *iter, + const GtkTextIter *limit); + GType mousepad_util_search_flags_get_type (void) G_GNUC_CONST; gint mousepad_util_highlight (GtkTextBuffer *buffer, diff --git a/mousepad/mousepad-view.c b/mousepad/mousepad-view.c index 2c0a7fe..5b79429 100644 --- a/mousepad/mousepad-view.c +++ b/mousepad/mousepad-view.c @@ -339,7 +339,7 @@ mousepad_view_key_press_event (GtkWidget *widget, MousepadView *view = MOUSEPAD_VIEW (widget);
[Xfce4-commits] mousepad:master * mousepad/mousepad-window.c: Cleanup some code and get rid of the multiple action groups.
Updating branch refs/heads/master to a75d9920d838e508c10dfd17908233d45dc20e6c (commit) from 2d17e63c32d75fb9fb7f98e8660b4980ec24af7d (commit) commit a75d9920d838e508c10dfd17908233d45dc20e6c Author: Nick Schermer n...@xfce.org Date: Wed Oct 17 18:53:22 2007 + * mousepad/mousepad-window.c: Cleanup some code and get rid of the multiple action groups. (Old svn revision: 26142) ChangeLog | 17 +++-- mousepad/mousepad-preferences.c |2 +- mousepad/mousepad-window.c | 131 +++ 3 files changed, 76 insertions(+), 74 deletions(-) diff --git a/ChangeLog b/ChangeLog index d5e4762..26390f6 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,11 +1,16 @@ 2007-10-17 Nick Schermer n...@xfce.org -* mousepad/mousepad-window.c: Decrease the menu lock when a window - is closed and disconnect the recent manager handler (this is a - bug since 2.12 because the manager is a floating object). + * mousepad/mousepad-window.c: Cleanup some code and get rid of the + multiple action groups. 2007-10-17 Nick Schermer n...@xfce.org -* mousepad/mousepad-{window,util}.c: Fix compiler warnings. + * mousepad/mousepad-window.c: Decrease the menu lock when a window + is closed and disconnect the recent manager handler (this is a + bug since 2.12 because the manager is a floating object). + + +2007-10-17 Nick Schermer n...@xfce.org + * mousepad/mousepad-{window,util}.c: Fix compiler warnings. 2007-10-16 Nick Schermer n...@xfce.org @@ -22,11 +27,11 @@ * mousepad/mousepad-encoding-dialog.{c,h}: Add a encoding dialog. This dialog should help users to find the right encoding for a document. - * mousepad/mousepad-print.{c,h}: Initial version of a basic + * mousepad/mousepad-print.{c,h}: Initial version of a basic printing support. Needs some big improvement tho. * mousepad/mousepad-statusbar: Fix issues with some theme engines that paint a line above the statusbar (instead of a frame). - * mousepad/mousepad-window.c: A window is now destoyed when it + * mousepad/mousepad-window.c: A window is now destoyed when it contains no tabs, previously this caused some segfaults with the tab dnd code, but this is all fixed now. * mousepad/mousepad-preferences.c: The option names are now stored diff --git a/mousepad/mousepad-preferences.c b/mousepad/mousepad-preferences.c index a372e19..5cb2fdc 100644 --- a/mousepad/mousepad-preferences.c +++ b/mousepad/mousepad-preferences.c @@ -571,7 +571,7 @@ mousepad_preferences_store (MousepadPreferences *preferences) { if (preferences-store_idle_id == 0) { - preferences-store_idle_id = g_idle_add_full (G_PRIORITY_LOW, (GSourceFunc) mousepad_preferences_store_idle, + preferences-store_idle_id = g_idle_add_full (G_PRIORITY_LOW, mousepad_preferences_store_idle, preferences, mousepad_preferences_store_idle_destroy); } } diff --git a/mousepad/mousepad-window.c b/mousepad/mousepad-window.c index 578582b..72a3ee2 100644 --- a/mousepad/mousepad-window.c +++ b/mousepad/mousepad-window.c @@ -277,10 +277,8 @@ struct _MousepadWindow GClosure*menu_item_selected_closure; GClosure*menu_item_deselected_closure; - /* action groups */ - GtkActionGroup *window_actions; - GtkActionGroup *gomenu_actions; - GtkActionGroup *recent_actions; + /* action group */ + GtkActionGroup *action_group; /* UI manager */ GtkUIManager*ui_manager; @@ -495,31 +493,25 @@ mousepad_window_init (MousepadWindow *window) gtk_window_set_default_size (GTK_WINDOW (window), width, height); /* the action group for this window */ - window-window_actions = gtk_action_group_new (WindowActions); - gtk_action_group_set_translation_domain (window-window_actions, GETTEXT_PACKAGE); - gtk_action_group_add_actions (window-window_actions, action_entries, G_N_ELEMENTS (action_entries), GTK_WIDGET (window)); - gtk_action_group_add_toggle_actions (window-window_actions, toggle_action_entries, G_N_ELEMENTS (toggle_action_entries), GTK_WIDGET (window)); + window-action_group = gtk_action_group_new (MousepadWindow); + gtk_action_group_set_translation_domain (window-action_group, GETTEXT_PACKAGE); + gtk_action_group_add_actions (window-action_group, action_entries, G_N_ELEMENTS (action_entries), GTK_WIDGET (window)); + gtk_action_group_add_toggle_actions (window-action_group, toggle_action_entries, G_N_ELEMENTS (toggle_action_entries), GTK_WIDGET (window)); /* create the ui manager and connect proxy signals for the statusbar */ window-ui_manager = gtk_ui_manager_new (); g_signal_connect (G_OBJECT (window-ui_manager), connect-proxy, G_CALLBACK (mousepad_window_connect_proxy), window);
[Xfce4-commits] mousepad:master * mousepad/mousepad-view.c: Respect input methods and don't insert text when the textview is not editable. * mousepad/mousepad-{file, document, window}.c: Properly ha
Updating branch refs/heads/master to 1f30cae6c6774f25728d5c7254e772281762abd6 (commit) from b01842db991e385a4a2373da1eaac1191197d9af (commit) commit 1f30cae6c6774f25728d5c7254e772281762abd6 Author: Nick Schermer n...@xfce.org Date: Thu Oct 18 09:47:52 2007 + * mousepad/mousepad-view.c: Respect input methods and don't insert text when the textview is not editable. * mousepad/mousepad-{file,document,window}.c: Properly handle read-only files. A file is now always readonly unless proven otherwise. (Old svn revision: 26145) ChangeLog|8 +++ mousepad/mousepad-document.c | 11 -- mousepad/mousepad-document.h |2 - mousepad/mousepad-file.c | 12 ++- mousepad/mousepad-file.h |2 + mousepad/mousepad-view.c | 44 ++--- mousepad/mousepad-window.c | 25 +-- mousepad/mousepad-window.h |4 --- 8 files changed, 63 insertions(+), 45 deletions(-) diff --git a/ChangeLog b/ChangeLog index 9ea6287..88904b8 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,4 +1,12 @@ 2007-10-18 Nick Schermer n...@xfce.org + * mousepad/mousepad-view.c: Respect input methods and don't insert + text when the textview is not editable. + * mousepad/mousepad-{file,document,window}.c: Properly handle + read-only files. A file is now always readonly unless proven + otherwise. + + +2007-10-18 Nick Schermer n...@xfce.org * mousepad/mousepad-utils.{c,h}: Add iter function to move the iter in front of text. Code used from one of the indentation functions. * mousepad/mousepad-view.c: Add code for a smart home button: when diff --git a/mousepad/mousepad-document.c b/mousepad/mousepad-document.c index 782568a..6104dda 100644 --- a/mousepad/mousepad-document.c +++ b/mousepad/mousepad-document.c @@ -525,17 +525,6 @@ mousepad_document_line_numbers (MousepadDocument *document, -gboolean -mousepad_document_get_readonly (MousepadDocument *document) -{ - _mousepad_return_val_if_fail (MOUSEPAD_IS_DOCUMENT (document), FALSE); - _mousepad_return_val_if_fail (GTK_IS_TEXT_VIEW (document-textview), FALSE); - - return !gtk_text_view_get_editable (GTK_TEXT_VIEW (document-textview)); -} - - - GtkWidget * mousepad_document_get_tab_label (MousepadDocument *document) { diff --git a/mousepad/mousepad-document.h b/mousepad/mousepad-document.h index d9af13d..550cab1 100644 --- a/mousepad/mousepad-document.h +++ b/mousepad/mousepad-document.h @@ -85,8 +85,6 @@ void mousepad_document_line_numbers (MousepadDocument gint *current_line, gint *last_line); -gboolean mousepad_document_get_readonly (MousepadDocument *document); - GtkWidget*mousepad_document_get_tab_label(MousepadDocument *document); const gchar *mousepad_document_get_basename (MousepadDocument *document); diff --git a/mousepad/mousepad-file.c b/mousepad/mousepad-file.c index 1388985..a02e28e 100644 --- a/mousepad/mousepad-file.c +++ b/mousepad/mousepad-file.c @@ -142,7 +142,7 @@ mousepad_file_init (MousepadFile *file) file-filename= NULL; file-encoding= NULL; file-line_ending = MOUSEPAD_LINE_END_NONE; - file-readonly= FALSE; + file-readonly= TRUE; file-mtime = 0; } @@ -245,6 +245,16 @@ mousepad_file_get_encoding (MousepadFile *file) +gboolean +mousepad_file_get_read_only (MousepadFile *file) +{ + _mousepad_return_val_if_fail (MOUSEPAD_IS_FILE (file), FALSE); + + return file-filename ? file-readonly : FALSE; +} + + + void mousepad_file_set_line_ending (MousepadFile *file, MousepadLineEnding line_ending) diff --git a/mousepad/mousepad-file.h b/mousepad/mousepad-file.h index d76ac4a..034216c 100644 --- a/mousepad/mousepad-file.h +++ b/mousepad/mousepad-file.h @@ -55,6 +55,8 @@ voidmousepad_file_set_encoding (MousepadFile const gchar*mousepad_file_get_encoding (MousepadFile *file); +gbooleanmousepad_file_get_read_only(MousepadFile *file); + voidmousepad_file_set_line_ending (MousepadFile *file, MousepadLineEnding line_ending); diff --git a/mousepad/mousepad-view.c b/mousepad/mousepad-view.c index 5b79429..42d64da 100644 --- a/mousepad/mousepad-view.c +++ b/mousepad/mousepad-view.c @@ -342,6 +342,8 @@ mousepad_view_key_press_event (GtkWidget *widget, GtkTextMark *cursor; guint modifiers; gchar *string; + gboolean im_handled; + gboolean is_editable; /* get the
[Xfce4-commits] mousepad:master * mousepad/mousepad-window.c: Make the recent manager a singleton in the application, this is also done in gtk 2.12. We also initialize the recent manager when needed
Updating branch refs/heads/master to 02326c575f8bc002d5a9680c1bb9b2d4b474125d (commit) from c68eede22f8717c245154f83dab5b6569fc45d13 (commit) commit 02326c575f8bc002d5a9680c1bb9b2d4b474125d Author: Nick Schermer n...@xfce.org Date: Sun Oct 21 19:08:51 2007 + * mousepad/mousepad-window.c: Make the recent manager a singleton in the application, this is also done in gtk 2.12. We also initialize the recent manager when needed, since it's quite expensive to create one. This should improve the startup speed a bit. (Old svn revision: 26173) ChangeLog |8 ++ mousepad/mousepad-window.c | 57 ++-- 2 files changed, 47 insertions(+), 18 deletions(-) diff --git a/ChangeLog b/ChangeLog index 84381f0..954b8b5 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,4 +1,12 @@ 2007-10-21 Nick Schermer n...@xfce.org + * mousepad/mousepad-window.c: Make the recent manager a singleton + in the application, this is also done in gtk 2.12. We also + initialize the recent manager when needed, since it's quite + expensive to create one. This should improve the startup speed + a bit. + + +2007-10-21 Nick Schermer n...@xfce.org * docs/: Import basic manual files. * configure.in.in, mousepad/Makefile.am: Don't search for startup- notification and gtk-unix-print. We don't use this in the code. diff --git a/mousepad/mousepad-window.c b/mousepad/mousepad-window.c index c943a3a..fcba33e 100644 --- a/mousepad/mousepad-window.c +++ b/mousepad/mousepad-window.c @@ -162,6 +162,7 @@ static void mousepad_window_recent_add (MousepadW static gchar*mousepad_window_recent_escape_underscores(const gchar*str); static gint mousepad_window_recent_sort (GtkRecentInfo *a, GtkRecentInfo *b); +static void mousepad_window_recent_manager_init (MousepadWindow *window); static gboolean mousepad_window_recent_menu_idle (gpointeruser_data); static void mousepad_window_recent_menu_idle_destroy (gpointeruser_data); static void mousepad_window_recent_menu (MousepadWindow *window); @@ -288,9 +289,6 @@ struct _MousepadWindow guintgomenu_merge_id; guintrecent_merge_id; - /* recent items manager */ - GtkRecentManager*recent_manager; - /* main window widgets */ GtkWidget *table; GtkWidget *notebook; @@ -367,9 +365,10 @@ static const GtkToggleActionEntry toggle_action_entries[] = -static GObjectClass *mousepad_window_parent_class; -static guint window_signals[LAST_SIGNAL]; -static gint lock_menu_updates = 0; +static GObjectClass *mousepad_window_parent_class; +static guint window_signals[LAST_SIGNAL]; +static gint lock_menu_updates = 0; +static GtkRecentManager *recent_manager = NULL; GtkWidget * @@ -508,11 +507,7 @@ mousepad_window_init (MousepadWindow *window) gtk_ui_manager_insert_action_group (window-ui_manager, window-action_group, 0); gtk_ui_manager_add_ui_from_string (window-ui_manager, mousepad_window_ui, mousepad_window_ui_length, NULL); - /* create the recent manager */ - window-recent_manager = gtk_recent_manager_get_default (); - g_signal_connect_swapped (G_OBJECT (window-recent_manager), changed, G_CALLBACK (mousepad_window_recent_menu), window); - - /* create the recent menu */ + /* create the recent menu (idle) */ mousepad_window_recent_menu (window); /* set accel group for the window */ @@ -606,7 +601,8 @@ mousepad_window_dispose (GObject *object) MousepadWindow *window = MOUSEPAD_WINDOW (object); /* disconnect recent manager signal */ - g_signal_handlers_disconnect_by_func (G_OBJECT (window-recent_manager), mousepad_window_recent_menu, window); + if (G_LIKELY (recent_manager)) +g_signal_handlers_disconnect_by_func (G_OBJECT (recent_manager), mousepad_window_recent_menu, window); /* destroy the save geometry timer source */ if (G_UNLIKELY (window-save_geometry_timer_id != 0)) @@ -1742,8 +1738,11 @@ mousepad_window_recent_add (MousepadWindow *window, if (G_LIKELY (uri != NULL)) { + /* make sure the recent manager is initialized */ + mousepad_window_recent_manager_init (window); + /* add the new recent info to the recent manager */ - gtk_recent_manager_add_full (window-recent_manager, uri, info); + gtk_recent_manager_add_full (recent_manager, uri, info); /* cleanup */ g_free (uri); @@ -1798,6 +1797,22 @@ mousepad_window_recent_sort (GtkRecentInfo *a, +static void
[Xfce4-commits] mousepad:master * mousepad/mousepad-window.c: Idea of the previous commit was good, but the implementation wasn't. Fix that.
Updating branch refs/heads/master to 765cea4b137c29bbb1abebad9440a4a9534c93d7 (commit) from 02326c575f8bc002d5a9680c1bb9b2d4b474125d (commit) commit 765cea4b137c29bbb1abebad9440a4a9534c93d7 Author: Nick Schermer n...@xfce.org Date: Mon Oct 22 09:18:55 2007 + * mousepad/mousepad-window.c: Idea of the previous commit was good, but the implementation wasn't. Fix that. (Old svn revision: 26174) ChangeLog |5 + mousepad/mousepad-window.c | 34 +++--- 2 files changed, 24 insertions(+), 15 deletions(-) diff --git a/ChangeLog b/ChangeLog index 954b8b5..fffb558 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2007-10-22 Nick Schermer n...@xfce.org + * mousepad/mousepad-window.c: Idea of the previous commit was good, + but the implementation wasn't. Fix that. + + 2007-10-21 Nick Schermer n...@xfce.org * mousepad/mousepad-window.c: Make the recent manager a singleton in the application, this is also done in gtk 2.12. We also diff --git a/mousepad/mousepad-window.c b/mousepad/mousepad-window.c index fcba33e..2b2b90b 100644 --- a/mousepad/mousepad-window.c +++ b/mousepad/mousepad-window.c @@ -284,6 +284,9 @@ struct _MousepadWindow /* action group */ GtkActionGroup *action_group; + /* recent manager */ + GtkRecentManager*recent_manager; + /* UI manager */ GtkUIManager*ui_manager; guintgomenu_merge_id; @@ -365,10 +368,10 @@ static const GtkToggleActionEntry toggle_action_entries[] = -static GObjectClass *mousepad_window_parent_class; -static guint window_signals[LAST_SIGNAL]; -static gint lock_menu_updates = 0; -static GtkRecentManager *recent_manager = NULL; +static GObjectClass *mousepad_window_parent_class; +static guint window_signals[LAST_SIGNAL]; +static gint lock_menu_updates = 0; + GtkWidget * @@ -467,6 +470,7 @@ mousepad_window_init (MousepadWindow *window) window-statusbar = NULL; window-replace_dialog = NULL; window-active = NULL; + window-recent_manager = NULL; /* add the preferences to the window */ window-preferences = mousepad_preferences_get (); @@ -601,8 +605,8 @@ mousepad_window_dispose (GObject *object) MousepadWindow *window = MOUSEPAD_WINDOW (object); /* disconnect recent manager signal */ - if (G_LIKELY (recent_manager)) -g_signal_handlers_disconnect_by_func (G_OBJECT (recent_manager), mousepad_window_recent_menu, window); + if (G_LIKELY (window-recent_manager)) +g_signal_handlers_disconnect_by_func (G_OBJECT (window-recent_manager), mousepad_window_recent_menu, window); /* destroy the save geometry timer source */ if (G_UNLIKELY (window-save_geometry_timer_id != 0)) @@ -1742,7 +1746,7 @@ mousepad_window_recent_add (MousepadWindow *window, mousepad_window_recent_manager_init (window); /* add the new recent info to the recent manager */ - gtk_recent_manager_add_full (recent_manager, uri, info); + gtk_recent_manager_add_full (window-recent_manager, uri, info); /* cleanup */ g_free (uri); @@ -1801,13 +1805,13 @@ static void mousepad_window_recent_manager_init (MousepadWindow *window) { /* set recent manager if not already done */ - if (G_UNLIKELY (recent_manager == NULL)) + if (G_UNLIKELY (window-recent_manager == NULL)) { /* get the default manager */ - recent_manager = gtk_recent_manager_get_default (); + window-recent_manager = gtk_recent_manager_get_default (); /* connect changed signal */ - g_signal_connect_swapped (G_OBJECT (recent_manager), changed, G_CALLBACK (mousepad_window_recent_menu), window); + g_signal_connect_swapped (G_OBJECT (window-recent_manager), changed, G_CALLBACK (mousepad_window_recent_menu), window); } } @@ -1848,7 +1852,7 @@ mousepad_window_recent_menu_idle (gpointer user_data) mousepad_window_recent_manager_init (window); /* get all the items in the manager */ - items = gtk_recent_manager_get_items (recent_manager); + items = gtk_recent_manager_get_items (window-recent_manager); /* walk through the items in the manager and pick the ones that or in the mousepad group */ for (li = items; li != NULL; li = li-next) @@ -1968,7 +1972,7 @@ mousepad_window_recent_clear (MousepadWindow *window) mousepad_window_recent_manager_init (window); /* get all the items in the manager */ - items = gtk_recent_manager_get_items (recent_manager); + items = gtk_recent_manager_get_items (window-recent_manager); /* walk through the items */ for (li = items; li != NULL; li = li-next) @@ -1983,7 +1987,7 @@ mousepad_window_recent_clear (MousepadWindow *window) uri = gtk_recent_info_get_uri (info); /* try to remove it, if it fails, break the loop to avoid multiple errors */ - if (G_UNLIKELY (gtk_recent_manager_remove_item (recent_manager,
[Xfce4-commits] mousepad:master * docs/: Import basic manual files. * configure.in.in, mousepad/Makefile.am: Don't search for startup- notification and gtk-unix-print. We don't use this in the code.
Updating branch refs/heads/master to c68eede22f8717c245154f83dab5b6569fc45d13 (commit) from 1f30cae6c6774f25728d5c7254e772281762abd6 (commit) commit c68eede22f8717c245154f83dab5b6569fc45d13 Author: Nick Schermer n...@xfce.org Date: Sun Oct 21 15:17:17 2007 + * docs/: Import basic manual files. * configure.in.in, mousepad/Makefile.am: Don't search for startup- notification and gtk-unix-print. We don't use this in the code. (Old svn revision: 26172) ChangeLog|6 + Makefile.am |5 +- configure.in.in | 45 +++ docs/Makefile.am |6 + docs/manual/C/Makefile.am| 68 ++ docs/manual/C/Mousepad.xml.in| 92 ++ docs/manual/C/images/Makefile.am |9 ++ docs/manual/Makefile.am | 14 ++ docs/manual/mousepad.css | 99 +++ docs/manual/mousepad.xsl | 254 ++ mousepad/Makefile.am |8 -- 11 files changed, 568 insertions(+), 38 deletions(-) diff --git a/ChangeLog b/ChangeLog index 88904b8..84381f0 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2007-10-21 Nick Schermer n...@xfce.org + * docs/: Import basic manual files. + * configure.in.in, mousepad/Makefile.am: Don't search for startup- + notification and gtk-unix-print. We don't use this in the code. + + 2007-10-18 Nick Schermer n...@xfce.org * mousepad/mousepad-view.c: Respect input methods and don't insert text when the textview is not editable. diff --git a/Makefile.am b/Makefile.am index d7f22d1..cc32972 100644 --- a/Makefile.am +++ b/Makefile.am @@ -3,7 +3,8 @@ SUBDIRS = \ icons \ mousepad \ - po + po \ + docs distclean-local: rm -rf *.spec *.cache *~ @@ -35,6 +36,6 @@ DISTCLEANFILES = \ $(desktop_DATA) DISTCHECK_CONFIGURE_FLAGS = \ - --enable-gtk-doc + --enable-xsltproc # vi:set ts=8 sw=8 noet ai nocindent syntax=automake: diff --git a/configure.in.in b/configure.in.in index dc79f57..ece6022 100644 --- a/configure.in.in +++ b/configure.in.in @@ -92,24 +92,17 @@ dnl ** XDT_CHECK_OPTIONAL_PACKAGE([DBUS], [dbus-glib-1], [0.34], [dbus], [D-BUS support]) -dnl * -dnl *** Optional support for startup notification *** -dnl * -XDT_CHECK_OPTIONAL_PACKAGE([LIBSTARTUP_NOTIFICATION], - [libstartup-notification-1.0], - [0.4], [startup-notification], - [startup notification library]) - -dnl *** -dnl *** Optional support for unix print support in GTK+ *** -dnl *** -XDT_CHECK_OPTIONAL_PACKAGE([GTK_UNIX_PRINT], [gtk+-unix-print-2.0], - [2.10.0], [gtk_unix_print], [GTK+ Unix print support]) - -dnl * -dnl *** Check for gtk-doc *** -dnl * -GTK_DOC_CHECK([1.0]) +dnl ** +dnl *** Check for xsltproc *** +dnl ** +AC_ARG_ENABLE([xsltproc], [AC_HELP_STRING([--enable-xsltproc], [Use xsltproc to build documentation @:@default=no@:@])],, [enable_xsltproc=no]) +if test x$enable_xsltproc = xyes; then + AC_PATH_PROG([XSLTPROC], [xsltproc], [no]) + if test x$XSLTPROC = xno; then +enable_xsltproc=no + fi +fi +AM_CONDITIONAL([ENABLE_XSLTPROC], [test x$enable_xsltproc = xyes]) dnl *** dnl *** Check for debugging support *** @@ -206,6 +199,11 @@ AC_SUBST([PLATFORM_LDFLAGS]) AC_OUTPUT([ Makefile +docs/Makefile +docs/manual/Makefile +docs/manual/C/Makefile +docs/manual/C/Mousepad.xml +docs/manual/C/images/Makefile icons/Makefile icons/16x16/Makefile icons/24x24/Makefile @@ -225,14 +223,5 @@ echo * D-BUS support: yes else echo * D-BUS support: no fi -if test x$LIBSTARTUP_NOTIFICATION_FOUND = xyes; then -echo * Startup Notification: yes -else -echo * Startup Notification: no -fi -if test x$GTK_UNIX_PRINT_FOUND = xyes; then -echo * GTK+ Unix Print Support: yes -else -echo * GTK+ Unix Print Support: no -fi +echo * Debug Support: $enable_debug echo diff --git a/docs/Makefile.am b/docs/Makefile.am new file mode 100644 index 000..a936fe8 --- /dev/null +++
[Xfce4-commits] mousepad:master * configure.in.in: Make sure __OPTIMIZE__ is enable in normal builds. * mousepad/mousepad-private.h: Tune G_LIKELY macros for pure boolean.
Updating branch refs/heads/master to 0960eed1341ae9789caafcb61500fa2006a12a67 (commit) from 765cea4b137c29bbb1abebad9440a4a9534c93d7 (commit) commit 0960eed1341ae9789caafcb61500fa2006a12a67 Author: Nick Schermer n...@xfce.org Date: Mon Oct 22 11:16:59 2007 + * configure.in.in: Make sure __OPTIMIZE__ is enable in normal builds. * mousepad/mousepad-private.h: Tune G_LIKELY macros for pure boolean. (Old svn revision: 26175) ChangeLog |5 + configure.in.in |3 +++ mousepad/mousepad-private.h | 12 3 files changed, 20 insertions(+), 0 deletions(-) diff --git a/ChangeLog b/ChangeLog index fffb558..8ee2fc6 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,4 +1,9 @@ 2007-10-22 Nick Schermer n...@xfce.org + * configure.in.in: Make sure __OPTIMIZE__ is enable in normal builds. + * mousepad/mousepad-private.h: Tune G_LIKELY macros for pure boolean. + + +2007-10-22 Nick Schermer n...@xfce.org * mousepad/mousepad-window.c: Idea of the previous commit was good, but the implementation wasn't. Fix that. diff --git a/configure.in.in b/configure.in.in index ece6022..226aa6e 100644 --- a/configure.in.in +++ b/configure.in.in @@ -154,6 +154,9 @@ else dnl Disable object cast checks PLATFORM_CPPFLAGS=$PLATFORM_CPPFLAGS -DG_DISABLE_CAST_CHECKS + dnl Make sure optimization is enabled in glib macros + PLATFORM_CPPFLAGS=$PLATFORM_CPPFLAGS -D__OPTIMIZE__ + dnl Disable all checks for --enable-debug=no if test x$enable_debug = xno; then PLATFORM_CPPFLAGS=$PLATFORM_CPPFLAGS -DG_DISABLE_ASSERT -DG_DISABLE_CHECKS diff --git a/mousepad/mousepad-private.h b/mousepad/mousepad-private.h index ee4da88..20d9eb8 100644 --- a/mousepad/mousepad-private.h +++ b/mousepad/mousepad-private.h @@ -72,6 +72,18 @@ G_BEGIN_DECLS #define g_value_get_object(v) (((const GValue *) (v))-data[0].v_pointer) #endif +/* properly set guess branch probability for pure booleans */ +#undef G_LIKELY +#undef G_UNLIKELY + +#if defined(NDEBUG) defined(__GNUC__) (__GNUC__ 2) +#define G_LIKELY(expr) (__builtin_expect (!!(expr), 1)) +#define G_UNLIKELY(expr) (__builtin_expect (!!(expr), 0)) +#else +#define G_LIKELY(expr) (expr) +#define G_UNLIKELY(expr) (expr) +#endif + G_END_DECLS #endif /* !__MOUSEPAD_PRIVATE_H__ */ ___ Xfce4-commits mailing list Xfce4-commits@xfce.org https://mail.xfce.org/mailman/listinfo/xfce4-commits
[Xfce4-commits] mousepad:master * configure.in.in, po/POTFILES.in: Fix dist-check. Thank to Brian for the hint. * mousepad/mousepad-{dialogs, window}.c: Implement tab size menu. You can set the defa
Updating branch refs/heads/master to 2d4c6469fc7680fe83c02af5ecfd4791f96de79f (commit) from 0960eed1341ae9789caafcb61500fa2006a12a67 (commit) commit 2d4c6469fc7680fe83c02af5ecfd4791f96de79f Author: Nick Schermer n...@xfce.org Date: Tue Oct 23 08:57:10 2007 + * configure.in.in, po/POTFILES.in: Fix dist-check. Thank to Brian for the hint. * mousepad/mousepad-{dialogs,window}.c: Implement tab size menu. You can set the default tab sizes in the rc file (MiscDefaultTabSizes). * mousepad/mousepad-window{-ui.xml,.c}: Reorder menus a bit. Go menu is now called 'Navigation' and the 'go to line' item is added to this menu. The document menu contains the tab size menu from now on. * Rename some functions and vars to more suitable names. (Old svn revision: 26178) ChangeLog | 15 ++- configure.in.in |2 +- mousepad/mousepad-dialogs.c | 45 +- mousepad/mousepad-dialogs.h | 31 ++-- mousepad/mousepad-document.c| 18 +- mousepad/mousepad-document.h|2 +- mousepad/mousepad-preferences.c | 13 ++- mousepad/mousepad-util.c|4 +- mousepad/mousepad-util.h|2 +- mousepad/mousepad-view.c| 32 ++-- mousepad/mousepad-view.h|6 +- mousepad/mousepad-window-ui.xml | 19 ++- mousepad/mousepad-window.c | 314 +++ po/POTFILES.in |1 + 14 files changed, 384 insertions(+), 120 deletions(-) diff --git a/ChangeLog b/ChangeLog index 8ee2fc6..f06185a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,6 +1,17 @@ +2007-10-23 Nick Schermer n...@xfce.org + * configure.in.in, po/POTFILES.in: Fix dist-check. Thank to Brian + for the hint. + * mousepad/mousepad-{dialogs,window}.c: Implement tab size menu. You + can set the default tab sizes in the rc file (MiscDefaultTabSizes). + * mousepad/mousepad-window{-ui.xml,.c}: Reorder menus a bit. Go menu + is now called 'Navigation' and the 'go to line' item is added to this + menu. The document menu contains the tab size menu from now on. + * Rename some functions and vars to more suitable names. + + 2007-10-22 Nick Schermer n...@xfce.org - * configure.in.in: Make sure __OPTIMIZE__ is enable in normal builds. - * mousepad/mousepad-private.h: Tune G_LIKELY macros for pure boolean. + * configure.in.in: Make sure __OPTIMIZE__ is enabled in normal builds. + * mousepad/mousepad-private.h: Tune G_LIKELY macros for pure booleans. 2007-10-22 Nick Schermer n...@xfce.org diff --git a/configure.in.in b/configure.in.in index 226aa6e..7099a24 100644 --- a/configure.in.in +++ b/configure.in.in @@ -21,7 +21,7 @@ dnl *** Initialize autoconf *** dnl *** AC_COPYRIGHT([Copyright (c) 2007 The Xfce development team. All rights reserved.]) -AC_INIT([Mousepad], [mousepad_version()], [http://bugzilla.xfce.org/], [mousepad]) +AC_INIT([Mousepad], [mousepad_version], [http://bugzilla.xfce.org/], [mousepad]) AC_PREREQ([2.50]) AC_CANONICAL_TARGET() AC_REVISION([$Id$]) diff --git a/mousepad/mousepad-dialogs.c b/mousepad/mousepad-dialogs.c index cfb4fa6..e404cba 100644 --- a/mousepad/mousepad-dialogs.c +++ b/mousepad/mousepad-dialogs.c @@ -79,9 +79,46 @@ mousepad_dialogs_show_error (GtkWindow*parent, gint -mousepad_dialogs_jump_to (GtkWindow *parent, - gint current_line, - gint last_line) +mousepad_dialogs_other_tab_size (GtkWindow *parent, + gint active_size) +{ + GtkWidget *dialog; + GtkWidget *scale; + + /* build dialog */ + dialog = gtk_dialog_new_with_buttons (_(Select Tab Size), +parent, +GTK_DIALOG_MODAL | GTK_DIALOG_DESTROY_WITH_PARENT | GTK_DIALOG_NO_SEPARATOR, +GTK_STOCK_CANCEL, MOUSEPAD_RESPONSE_CANCEL, +GTK_STOCK_OK, MOUSEPAD_RESPONSE_OK, +NULL); + gtk_dialog_set_default_response (GTK_DIALOG (dialog), MOUSEPAD_RESPONSE_OK); + + /* create scale widget */ + scale = gtk_hscale_new_with_range (1, 32, 1); + gtk_range_set_value (GTK_RANGE (scale), active_size); + gtk_scale_set_digits (GTK_SCALE (scale), 0); + gtk_scale_set_draw_value (GTK_SCALE (scale), TRUE); + gtk_scale_set_value_pos (GTK_SCALE (scale), GTK_POS_TOP); + gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog)-vbox), scale, TRUE, TRUE, 0); + gtk_widget_show (scale); + + /* run the dialog */ + if (gtk_dialog_run (GTK_DIALOG (dialog)) == MOUSEPAD_RESPONSE_OK) +active_size = gtk_range_get_value (GTK_RANGE (scale)); + + /* destroy the dialog */ + gtk_widget_destroy (dialog); + + return active_size; +} + + + +gint +mousepad_dialogs_go_to_line (GtkWindow
[Xfce4-commits] mousepad:master * mousepad/mousepad-view.c: Redraw selection on theme change.
Updating branch refs/heads/master to 673f739167aa23710a7b570eb7e863871fd09e4d (commit) from 24c163061c3e40620db488f98c51f1edd8d20f62 (commit) commit 673f739167aa23710a7b570eb7e863871fd09e4d Author: Nick Schermer n...@xfce.org Date: Thu Oct 25 20:46:06 2007 + * mousepad/mousepad-view.c: Redraw selection on theme change. (Old svn revision: 26197) ChangeLog|4 mousepad/mousepad-view.c |4 2 files changed, 8 insertions(+), 0 deletions(-) diff --git a/ChangeLog b/ChangeLog index 5e9a0f3..718f5ec 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,4 +1,8 @@ 2007-10-25 Nick Schermer n...@xfce.org + * mousepad/mousepad-view.c: Redraw selection on theme change. + + +2007-10-25 Nick Schermer n...@xfce.org * mousepad/mousepad-view.c: Reimplemented multi-selection. It is also possible to do multi editing (typing in all the selections), select random words in the document (they will be copied to the clipboard as diff --git a/mousepad/mousepad-view.c b/mousepad/mousepad-view.c index 088f44d..dec3071 100644 --- a/mousepad/mousepad-view.c +++ b/mousepad/mousepad-view.c @@ -343,6 +343,10 @@ mousepad_view_style_set (GtkWidget *widget, /* update the tab size */ mousepad_view_set_tab_size (view, view-tab_size); + + /* redraw selection */ + if (view-flags != 0) +mousepad_view_selection_draw (view, !MOUSEPAD_HAS_FLAG (view-flags, HAS_CONTENT), FALSE); } } ___ Xfce4-commits mailing list Xfce4-commits@xfce.org https://mail.xfce.org/mailman/listinfo/xfce4-commits
[Xfce4-commits] mousepad:master * MousepadHelp.in, mousepad/mousepad-{dialogs, window}.{c, h}: Add support for the help file. * Mousepad.spec.in: Add spec file.
Updating branch refs/heads/master to ec4cae752aa01e235b870df476b0c3008cb24f4d (commit) from 673f739167aa23710a7b570eb7e863871fd09e4d (commit) commit ec4cae752aa01e235b870df476b0c3008cb24f4d Author: Nick Schermer n...@xfce.org Date: Fri Oct 26 08:43:19 2007 + * MousepadHelp.in, mousepad/mousepad-{dialogs,window}.{c,h}: Add support for the help file. * Mousepad.spec.in: Add spec file. (Old svn revision: 26199) ChangeLog |6 + Makefile.am | 14 +++ Mousepad.spec.in| 51 +++ MousepadHelp.in | 51 +++ mousepad/mousepad-dialogs.c | 51 +++ mousepad/mousepad-dialogs.h |4 +++ mousepad/mousepad-window.c |2 +- 7 files changed, 178 insertions(+), 1 deletions(-) diff --git a/ChangeLog b/ChangeLog index 718f5ec..e64012a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2007-10-26 Nick Schermer n...@xfce.org + * MousepadHelp.in, mousepad/mousepad-{dialogs,window}.{c,h}: + Add support for the help file. + * Mousepad.spec.in: Add spec file. + + 2007-10-25 Nick Schermer n...@xfce.org * mousepad/mousepad-view.c: Redraw selection on theme change. diff --git a/Makefile.am b/Makefile.am index cc32972..aafee93 100644 --- a/Makefile.am +++ b/Makefile.am @@ -13,6 +13,16 @@ rpm: dist rpmbuild -ta $(PACKAGE)-$(VERSION).tar.gz @rm -f $(PACKAGE)-$(VERSION).tar.gz +libexec_SCRIPTS = \ + MousepadHelp + +MousepadHelp: MousepadHelp.in Makefile + rm -f MousepadHelp.gen MousepadHelp + sed -e s,\@datadir\@,$(datadir),g \ +$(srcdir)/MousepadHelp.in \ +MousepadHelp.gen + mv MousepadHelp.gen MousepadHelp + desktopdir = $(datadir)/applications desktop_in_in_files = \ Mousepad.desktop.in.in @@ -23,12 +33,16 @@ desktop_DATA = $(desktop_in_files:.desktop.in=.desktop) @INTLTOOL_DESKTOP_RULE@ EXTRA_DIST = \ + MousepadHelp.in \ + Mousepad.spec.in \ intltool-extract.in \ intltool-merge.in \ intltool-update.in \ $(desktop_in_in_files) DISTCLEANFILES = \ + MousepadHelp \ + Mousepad.spec \ intltool-extract \ intltool-merge \ intltool-update \ diff --git a/Mousepad.spec.in b/Mousepad.spec.in new file mode 100644 index 000..eaf1459 --- /dev/null +++ b/Mousepad.spec.in @@ -0,0 +1,51 @@ +Summary: Mousepad Text Editor +Name: @PACKAGE_TARNAME@ +Version: @PACKAGE_VERSION@ +Release: 1 +License: GPL +URL: http://www.xfce.org/ +Source0: %{name}-%{version}.tar.gz +Group: Applications/X11 +BuildRoot: %{_tmppath}/%{name}-root +Requires: gtk2 = @GTK_REQUIRED_VERSION@ +Requires: libxfce4util = @LIBXFCE4UTIL_REQUIRED_VERSION@ +BuildRequires: gtk2-devel = @GTK_REQUIRED_VERSION@ +BuildRequires: libxfce4util-devel = @LIBXFCE4UTIL_REQUIRED_VERSION@ + +%description +Mousepad is a simple text editor for the Xfce Desktop Environment. + +%prep +%setup -q + +%build +%configure --enable-dbus --enable-final --enable-xsltproc +make + +%install +rm -rf $RPM_BUILD_ROOT +make install DESTDIR=$RPM_BUILD_ROOT mandir=%{_mandir} + +%clean +rm -rf $RPM_BUILD_ROOT + +%post +update-desktop-database /dev/null ||: +touch --no-create %{_datadir}/icons/hicolor || : +if [ -x %{_bindir}/gtk-update-icon-cache ]; then + %{_bindir}/gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor || : +fi + +%postun +update-desktop-database /dev/null ||: +touch --no-create %{_datadir}/icons/hicolor || : +if [ -x %{_bindir}/gtk-update-icon-cache ]; then + %{_bindir}/gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor || : +fi + +%files +%defattr(-,root,root) +%doc AUTHORS ChangeLog COPYING INSTALL NEWS README THANKS TODO +%{_bindir}/ +%{_datadir}/ +%{_libexecdir}/ diff --git a/MousepadHelp.in b/MousepadHelp.in new file mode 100644 index 000..773b8a0 --- /dev/null +++
[Xfce4-commits] mousepad:master * mousepad/mousepad-view.c: Implement transpose: - Selection on one line: Inverse selected text. - Multiple lines selected: Invert seleted lines. - Cursor is inside a
Updating branch refs/heads/master to 03cd4c266c5d539c85dbe22f505d1d54c1b011b4 (commit) from ec4cae752aa01e235b870df476b0c3008cb24f4d (commit) commit 03cd4c266c5d539c85dbe22f505d1d54c1b011b4 Author: Nick Schermer n...@xfce.org Date: Fri Oct 26 15:02:40 2007 + * mousepad/mousepad-view.c: Implement transpose: - Selection on one line: Inverse selected text. - Multiple lines selected: Invert seleted lines. - Cursor is inside a word: Swap chars on each side of the cursor. - Cursor is outside a word: Swap word left and right of the cursor. - Cursor at the start of a line: Swap line with the line above. - Cursor at the end of a line: Swap line with the line below. Will add support for multi- and column-selections later. Thanks to Textmate for this great idea. (Old svn revision: 26200) ChangeLog | 12 ++ mousepad/mousepad-view.c| 250 ++- mousepad/mousepad-view.h|2 + mousepad/mousepad-window-ui.xml |2 + mousepad/mousepad-window.c | 38 -- 5 files changed, 288 insertions(+), 16 deletions(-) diff --git a/ChangeLog b/ChangeLog index e64012a..2d87175 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,4 +1,16 @@ 2007-10-26 Nick Schermer n...@xfce.org + * mousepad/mousepad-view.c: Implement transpose: + - Selection on one line: Inverse selected text. + - Multiple lines selected: Invert seleted lines. + - Cursor is inside a word: Swap chars on each side of the cursor. + - Cursor is outside a word: Swap word left and right of the cursor. + - Cursor at the start of a line: Swap line with the line above. + - Cursor at the end of a line: Swap line with the line below. + Will add support for multi- and column-selections later. Thanks to + Textmate for this great idea. + + +2007-10-26 Nick Schermer n...@xfce.org * MousepadHelp.in, mousepad/mousepad-{dialogs,window}.{c,h}: Add support for the help file. * Mousepad.spec.in: Add spec file. diff --git a/mousepad/mousepad-view.c b/mousepad/mousepad-view.c index dec3071..2fed762 100644 --- a/mousepad/mousepad-view.c +++ b/mousepad/mousepad-view.c @@ -77,6 +77,15 @@ static gchar*mousepad_view_indent_string (GtkTextBuffer static gint mousepad_view_calculate_layout_width(GtkWidget *widget, gsize length, gchar fill_char); +static void mousepad_view_transpose_range (GtkTextBuffer *buffer, + GtkTextIter *start_iter, + GtkTextIter *end_iter); +static void mousepad_view_transpose_lines (GtkTextBuffer *buffer, + GtkTextIter *start_iter, + GtkTextIter *end_iter); +static void mousepad_view_transpose_words (GtkTextBuffer *buffer, + GtkTextIter *iter); + enum _MousepadViewFlags @@ -1232,8 +1241,8 @@ mousepad_view_selection_clipboard (MousepadView *view, _mousepad_return_if_fail (view-marks == NULL || g_slist_length (view-marks) % 2 == 0); - /* create string with some size so we don't have to realloc a zillon times */ - string = g_string_sized_new (1024); + /* create new string */ + string = g_string_new (NULL); /* get the buffer */ buffer = mousepad_view_get_buffer (view); @@ -1495,6 +1504,243 @@ mousepad_view_put_cursor_on_screen (MousepadView *view) +static void +mousepad_view_transpose_range (GtkTextBuffer *buffer, + GtkTextIter *start_iter, + GtkTextIter *end_iter) +{ + gchar *string, *reversed; + gint offset; + + /* store start iter line offset */ + offset = gtk_text_iter_get_offset (start_iter); + + /* get selected text */ + string = gtk_text_buffer_get_slice (buffer, start_iter, end_iter, FALSE); + + /* reverse the string */ + reversed = g_utf8_strreverse (string, -1); + + /* cleanup */ + g_free (string); + + /* delete the text between the iters */ + gtk_text_buffer_delete (buffer, start_iter, end_iter); + + /* insert the reversed string */ + gtk_text_buffer_insert (buffer, end_iter, reversed, -1); + + /* cleanup */ + g_free (reversed); + + /* restore start iter */ + gtk_text_buffer_get_iter_at_offset (buffer, start_iter, offset); +} + + + +static void +mousepad_view_transpose_lines (GtkTextBuffer *buffer, +
[Xfce4-commits] mousepad:master * mousepad/mousepad-print.c: Use bold attribute for labels, so there is no html in the strings.
Updating branch refs/heads/master to debc440d2c428b5aa91dcb567fd96a4f50a2804c (commit) from f3a364cda15d48093802adbb4190a1d027e6a102 (commit) commit debc440d2c428b5aa91dcb567fd96a4f50a2804c Author: Nick Schermer n...@xfce.org Date: Thu Nov 29 18:00:22 2007 + * mousepad/mousepad-print.c: Use bold attribute for labels, so there is no html in the strings. (Old svn revision: 26405) ChangeLog |5 +++ mousepad/mousepad-print.c | 88 + 2 files changed, 62 insertions(+), 31 deletions(-) diff --git a/ChangeLog b/ChangeLog index 72fca2a..b9c52c9 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,4 +1,9 @@ 2007-11-29 Nick Schermer n...@xfce.org + * mousepad/mousepad-print.c: Use bold attribute for labels, so there + is no html in the strings. + + +2007-11-29 Nick Schermer n...@xfce.org * mousepad/mousepad-utils.c: Add functions that extent the default Gtk word start/end function. Use them in the search functions, transpose and double click selection. diff --git a/mousepad/mousepad-print.c b/mousepad/mousepad-print.c index 94bc85f..cbb4e9a 100644 --- a/mousepad/mousepad-print.c +++ b/mousepad/mousepad-print.c @@ -32,31 +32,32 @@ -static void mousepad_print_class_init(MousepadPrintClass *klass); -static void mousepad_print_init (MousepadPrint *print); -static void mousepad_print_finalize (GObject *object); -static void mousepad_print_settings_load (GtkPrintOperation *operation); -static void mousepad_print_settings_save_foreach (const gchar *key, -const gchar *value, -gpointer user_data); -static void mousepad_print_settings_save (GtkPrintOperation *operation); -static void mousepad_print_begin_print (GtkPrintOperation *operation, -GtkPrintContext *context); -static void mousepad_print_draw_page (GtkPrintOperation *operation, -GtkPrintContext *context, -gint page_nr); -static void mousepad_print_end_print (GtkPrintOperation *operation, -GtkPrintContext *context); -static void mousepad_print_page_setup_dialog (GtkWidget *button, -GtkPrintOperation *operation); -static void mousepad_print_button_toggled(GtkWidget *button, -MousepadPrint *print); -static void mousepad_print_button_font_set (GtkFontButton *button, -MousepadPrint *print); -static GtkWidget *mousepad_print_create_custom_widget (GtkPrintOperation *operation); -static void mousepad_print_status_changed(GtkPrintOperation *operation); -static void mousepad_print_done (GtkPrintOperation *operation, - GtkPrintOperationResult result); +static void mousepad_print_class_init(MousepadPrintClass *klass); +static void mousepad_print_init (MousepadPrint *print); +static void mousepad_print_finalize (GObject *object); +static void mousepad_print_settings_load (GtkPrintOperation *operation); +static void mousepad_print_settings_save_foreach (const gchar *key, +const gchar *value, +gpointer user_data); +static void mousepad_print_settings_save (GtkPrintOperation *operation); +static void mousepad_print_begin_print (GtkPrintOperation *operation, +GtkPrintContext *context); +static void mousepad_print_draw_page (GtkPrintOperation *operation, +GtkPrintContext *context, +gint page_nr); +static void mousepad_print_end_print (GtkPrintOperation *operation, +
[Xfce4-commits] mousepad:master * mousepad/mousepad-window.c: Use a box for packing the window elements. A table was not really needed, and boxes are a bit faster in calculating child sizes. * mouse
Updating branch refs/heads/master to d2cf9f1d53f4818ea92e162cf6b71b9963144ce8 (commit) from debc440d2c428b5aa91dcb567fd96a4f50a2804c (commit) commit d2cf9f1d53f4818ea92e162cf6b71b9963144ce8 Author: Nick Schermer n...@xfce.org Date: Thu Nov 29 18:29:46 2007 + * mousepad/mousepad-window.c: Use a box for packing the window elements. A table was not really needed, and boxes are a bit faster in calculating child sizes. * mousepad/mousepad-window.c: Remove unused variable. (Old svn revision: 26406) ChangeLog |7 +++ mousepad/mousepad-window.c | 33 + 2 files changed, 20 insertions(+), 20 deletions(-) diff --git a/ChangeLog b/ChangeLog index b9c52c9..0d17c79 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,4 +1,11 @@ 2007-11-29 Nick Schermer n...@xfce.org + * mousepad/mousepad-window.c: Use a box for packing the window elements. + A table was not really needed, and boxes are a bit faster in calculating + child sizes. + * mousepad/mousepad-window.c: Remove unused variable. + + +2007-11-29 Nick Schermer n...@xfce.org * mousepad/mousepad-print.c: Use bold attribute for labels, so there is no html in the strings. diff --git a/mousepad/mousepad-window.c b/mousepad/mousepad-window.c index 504ce43..16dbf3a 100644 --- a/mousepad/mousepad-window.c +++ b/mousepad/mousepad-window.c @@ -50,7 +50,7 @@ -#define WINDOW_SPACING 3 +#define PADDING (2) #if GTK_CHECK_VERSION (2,12,0) static gpointer NOTEBOOK_GROUP = Mousepad; @@ -307,9 +307,8 @@ struct _MousepadWindow guintrecent_merge_id; /* main window widgets */ - GtkWidget *table; + GtkWidget *box; GtkWidget *notebook; - GtkWidget *container; GtkWidget *search_bar; GtkWidget *statusbar; GtkWidget *replace_dialog; @@ -539,12 +538,12 @@ mousepad_window_init (MousepadWindow *window) gtk_window_add_accel_group (GTK_WINDOW (window), accel_group); /* create the main table */ - window-table = gtk_table_new (6, 1, FALSE); - gtk_container_add (GTK_CONTAINER (window), window-table); - gtk_widget_show (window-table); + window-box = gtk_vbox_new (FALSE, 0); + gtk_container_add (GTK_CONTAINER (window), window-box); + gtk_widget_show (window-box); menubar = gtk_ui_manager_get_widget (window-ui_manager, /main-menu); - gtk_table_attach (GTK_TABLE (window-table), menubar, 0, 1, 0, 1, GTK_EXPAND | GTK_FILL, GTK_FILL, 0, 0); + gtk_box_pack_start (GTK_BOX (window-box), menubar, FALSE, FALSE, 0); gtk_widget_show (menubar); /* check if we need to add the root warning */ @@ -562,7 +561,7 @@ mousepad_window_init (MousepadWindow *window) /* add the box for the root warning */ ebox = gtk_event_box_new (); gtk_widget_set_name (ebox, root-warning); - gtk_table_attach (GTK_TABLE (window-table), ebox, 0, 1, 1, 2, GTK_EXPAND | GTK_FILL, GTK_FILL, 0, 0); + gtk_box_pack_start (GTK_BOX (window-box), ebox, FALSE, FALSE, 0); gtk_widget_show (ebox); /* add the label with the root warning */ @@ -572,7 +571,7 @@ mousepad_window_init (MousepadWindow *window) gtk_widget_show (label); separator = gtk_hseparator_new (); - gtk_table_attach (GTK_TABLE (window-table), separator, 0, 1, 2, 3, GTK_EXPAND | GTK_FILL, GTK_FILL, 0, 0); + gtk_box_pack_start (GTK_BOX (window-box), separator, FALSE, FALSE, 0); gtk_widget_show (separator); } @@ -604,8 +603,7 @@ mousepad_window_init (MousepadWindow *window) #endif /* append and show the notebook */ - gtk_table_attach (GTK_TABLE (window-table), window-notebook, 0, 1, 3, 4, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0); - gtk_table_set_row_spacing (GTK_TABLE (window-table), 2, WINDOW_SPACING); + gtk_box_pack_start (GTK_BOX (window-box), window-notebook, TRUE, TRUE, PADDING); gtk_widget_show (window-notebook); /* check if we should display the statusbar by default */ @@ -2350,7 +2348,6 @@ mousepad_window_hide_search_bar (MousepadWindow *window) /* hide the search bar */ gtk_widget_hide (window-search_bar); - gtk_table_set_row_spacing (GTK_TABLE (window-table), 3, 0); /* focus the active document's text view */ if (G_LIKELY (window-active)) @@ -2933,18 +2930,17 @@ mousepad_window_action_find (GtkAction *action, { if (window-search_bar == NULL) { - /* create a new toolbar */ + /* create a new toolbar and pack it into the box */ window-search_bar = mousepad_search_bar_new (); - gtk_table_attach (GTK_TABLE (window-table), window-search_bar, 0, 1, 4, 5, GTK_EXPAND | GTK_FILL, GTK_FILL, 0, 0); + gtk_box_pack_start (GTK_BOX (window-box), window-search_bar, FALSE, FALSE, PADDING); /* connect signals */ g_signal_connect_swapped (G_OBJECT (window-search_bar), hide-bar, G_CALLBACK
[Xfce4-commits] mousepad:master * mousepad/mousepad-document.c: Make tab close button a bit smaller.
Updating branch refs/heads/master to 976c9707d60945030612eaf79db2e577135fe4ef (commit) from d2cf9f1d53f4818ea92e162cf6b71b9963144ce8 (commit) commit 976c9707d60945030612eaf79db2e577135fe4ef Author: Nick Schermer n...@xfce.org Date: Thu Nov 29 19:20:44 2007 + * mousepad/mousepad-document.c: Make tab close button a bit smaller. (Old svn revision: 26407) ChangeLog|4 mousepad/mousepad-document.c | 23 +++ 2 files changed, 19 insertions(+), 8 deletions(-) diff --git a/ChangeLog b/ChangeLog index 0d17c79..711aa0d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,4 +1,8 @@ 2007-11-29 Nick Schermer n...@xfce.org + * mousepad/mousepad-document.c: Make tab close button a bit smaller. + + +2007-11-29 Nick Schermer n...@xfce.org * mousepad/mousepad-window.c: Use a box for packing the window elements. A table was not really needed, and boxes are a bit faster in calculating child sizes. diff --git a/mousepad/mousepad-document.c b/mousepad/mousepad-document.c index 3a318e2..3c388dc 100644 --- a/mousepad/mousepad-document.c +++ b/mousepad/mousepad-document.c @@ -499,8 +499,9 @@ mousepad_document_line_numbers (MousepadDocument *document, GtkWidget * mousepad_document_get_tab_label (MousepadDocument *document) { - GtkWidget *hbox; - GtkWidget *button, *image; + GtkWidget *hbox; + GtkWidget *button, *image; + GtkRcStyle *style; /* create the box */ hbox = gtk_hbox_new (FALSE, 0); @@ -518,12 +519,18 @@ mousepad_document_get_tab_label (MousepadDocument *document) gtk_widget_show (document-priv-label); /* create the button */ - button = g_object_new (GTK_TYPE_BUTTON, - relief, GTK_RELIEF_NONE, - focus-on-click, FALSE, - border-width, 0, - can-default, FALSE, - can-focus, FALSE, NULL); + button = gtk_button_new (); + gtk_button_set_focus_on_click (GTK_BUTTON (button), FALSE); + gtk_button_set_relief (GTK_BUTTON (button), GTK_RELIEF_NONE); + GTK_WIDGET_UNSET_FLAGS (button, GTK_CAN_DEFAULT | GTK_CAN_FOCUS); + + /* make button a bit smaller */ + style = gtk_rc_style_new (); + style-xthickness = style-ythickness = 0; + gtk_widget_modify_style (button, style); + gtk_rc_style_unref (style); + + /* pack button, add signal and tooltip */ mousepad_util_set_tooltip (button, _(Close this tab)); gtk_box_pack_start (GTK_BOX (hbox), button, FALSE, FALSE, 0); g_signal_connect (G_OBJECT (button), clicked, G_CALLBACK (mousepad_document_tab_button_clicked), document); ___ Xfce4-commits mailing list Xfce4-commits@xfce.org https://mail.xfce.org/mailman/listinfo/xfce4-commits
[Xfce4-commits] mousepad:master * mousepad/mousepad-{search-bar, window}.c: Remove highlight when hiding the search bar. Search ahead when opening the search bar.
Updating branch refs/heads/master to f67680befa81f562943b591a7143e25baea1fb17 (commit) from 72415680ea141554b03f505d5f9a96861957c5a0 (commit) commit f67680befa81f562943b591a7143e25baea1fb17 Author: Nick Schermer n...@xfce.org Date: Sat Dec 8 10:31:50 2007 + * mousepad/mousepad-{search-bar,window}.c: Remove highlight when hiding the search bar. Search ahead when opening the search bar. (Old svn revision: 26450) ChangeLog |6 ++ mousepad/mousepad-search-bar.c |5 - mousepad/mousepad-window.c | 13 + 3 files changed, 19 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index 1ac7eef..724b54b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2007-12-08 Nick Schermer n...@xfce.org + + * mousepad/mousepad-{search-bar,window}.c: Remove highlight when + hiding the search bar. Search ahead when opening the search bar. + + 2007-12-07 Nick Schermer n...@xfce.org * mousepad/mousepad-search-bar.c: Fix red entry when toggling the diff --git a/mousepad/mousepad-search-bar.c b/mousepad/mousepad-search-bar.c index 4fa61dc..be06618 100644 --- a/mousepad/mousepad-search-bar.c +++ b/mousepad/mousepad-search-bar.c @@ -152,7 +152,7 @@ mousepad_search_bar_class_init (MousepadSearchBarClass *klass) search_bar_signals[SEARCH] = g_signal_new (I_(search), G_TYPE_FROM_CLASS (gobject_class), - G_SIGNAL_NO_HOOKS , + G_SIGNAL_NO_HOOKS, 0, NULL, NULL, _mousepad_marshal_INT__FLAGS_STRING_STRING, G_TYPE_INT, 3, @@ -514,6 +514,9 @@ mousepad_search_bar_focus (MousepadSearchBar *bar) /* focus the entry field */ gtk_widget_grab_focus (bar-entry); + /* trigger search function */ + mousepad_search_bar_entry_changed (NULL, bar); + /* update the highlight */ mousepad_search_bar_highlight_schedule (bar); } diff --git a/mousepad/mousepad-window.c b/mousepad/mousepad-window.c index 9adf5a5..9defb9d 100644 --- a/mousepad/mousepad-window.c +++ b/mousepad/mousepad-window.c @@ -2654,19 +2654,24 @@ mousepad_window_search (MousepadWindow *window, static void mousepad_window_hide_search_bar (MousepadWindow *window) { + MousepadSearchFlags flags; + _mousepad_return_if_fail (MOUSEPAD_IS_WINDOW (window)); + _mousepad_return_if_fail (MOUSEPAD_IS_DOCUMENT (window-active)); _mousepad_return_if_fail (MOUSEPAD_IS_SEARCH_BAR (window-search_bar)); + /* setup flags */ + flags = MOUSEPAD_SEARCH_FLAGS_ACTION_HIGHTLIGHT + | MOUSEPAD_SEARCH_FLAGS_ACTION_CLEANUP; + /* remove the highlight */ - //mousepad_search_bar_reset_highlight (MOUSEPAD_SEARCH_BAR (window-search_bar)); - /* TODO */ + mousepad_window_search (window, flags, NULL, NULL); /* hide the search bar */ gtk_widget_hide (window-search_bar); /* focus the active document's text view */ - if (G_LIKELY (window-active)) -mousepad_document_focus_textview (window-active); + mousepad_document_focus_textview (window-active); } ___ Xfce4-commits mailing list Xfce4-commits@xfce.org https://mail.xfce.org/mailman/listinfo/xfce4-commits
[Xfce4-commits] mousepad:master * mousepad/mousepad-search-bar.c: Fix red entry when toggling the highlight button.
Updating branch refs/heads/master to 72415680ea141554b03f505d5f9a96861957c5a0 (commit) from 562a27b0824e528841b1a58b01d8c9978f4bd05e (commit) commit 72415680ea141554b03f505d5f9a96861957c5a0 Author: Nick Schermer n...@xfce.org Date: Fri Dec 7 19:42:23 2007 + * mousepad/mousepad-search-bar.c: Fix red entry when toggling the highlight button. (Old svn revision: 26447) ChangeLog |8 +- mousepad/mousepad-search-bar.c | 58 ++-- 2 files changed, 45 insertions(+), 21 deletions(-) diff --git a/ChangeLog b/ChangeLog index 3f3b0a1..1ac7eef 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,4 +1,10 @@ -2007-xx-xx Nick Schermer n...@xfce.org +2007-12-07 Nick Schermer n...@xfce.org + + * mousepad/mousepad-search-bar.c: Fix red entry when toggling the + highlight button. + + +2007-12-06 Nick Schermer n...@xfce.org * mousepad/mousepad-document.c: Fix column number in statusbar. First column is 0 and not 1. diff --git a/mousepad/mousepad-search-bar.c b/mousepad/mousepad-search-bar.c index f2a17a9..4fa61dc 100644 --- a/mousepad/mousepad-search-bar.c +++ b/mousepad/mousepad-search-bar.c @@ -322,12 +322,16 @@ mousepad_search_bar_find_string (MousepadSearchBar *bar, /* emit signal */ g_signal_emit (G_OBJECT (bar), search_bar_signals[SEARCH], 0, flags, string, NULL, nmatches); - /* make sure the search entry is not red when no text was typed */ - if (string == NULL || *string == '\0') -nmatches = 1; + /* do nothing with the error entry when highlight when trigged with highlight */ + if ((flags MOUSEPAD_SEARCH_FLAGS_ACTION_HIGHTLIGHT) == 0) +{ + /* make sure the search entry is not red when no text was typed */ + if (string == NULL || *string == '\0') +nmatches = 1; - /* change the entry style */ - mousepad_util_entry_error (bar-entry, nmatches 1); + /* change the entry style */ + mousepad_util_entry_error (bar-entry, nmatches 1); +} } @@ -357,8 +361,7 @@ mousepad_search_bar_entry_changed (GtkWidget *entry, mousepad_search_bar_find_string (bar, flags); /* schedule a new highlight */ - if (bar-highlight_all) -mousepad_search_bar_highlight_schedule (bar); + mousepad_search_bar_highlight_schedule (bar); } @@ -367,13 +370,31 @@ static void mousepad_search_bar_highlight_toggled (GtkWidget *button, MousepadSearchBar *bar) { + MousepadSearchFlags flags; + _mousepad_return_if_fail (MOUSEPAD_IS_SEARCH_BAR (bar)); /* set the new state */ bar-highlight_all = gtk_toggle_tool_button_get_active (GTK_TOGGLE_TOOL_BUTTON (button)); - /* reschedule the highlight */ - mousepad_search_bar_highlight_schedule (bar); + if (bar-highlight_all) +{ + /* reschedule the highlight */ + mousepad_search_bar_highlight_schedule (bar); +} + else +{ + /* stop timeout */ + if (bar-highlight_id != 0) +g_source_remove (bar-highlight_id); + + /* set search flags */ + flags = MOUSEPAD_SEARCH_FLAGS_ACTION_HIGHTLIGHT + | MOUSEPAD_SEARCH_FLAGS_ACTION_CLEANUP; + + /* emit signal to cleanup the highlight */ + mousepad_search_bar_find_string (bar, flags); +} } @@ -402,8 +423,7 @@ mousepad_search_bar_match_case_toggled (GtkWidget *button, mousepad_search_bar_entry_changed (NULL, bar); /* schedule a new hightlight */ - if (bar-highlight_all) -mousepad_search_bar_highlight_schedule (bar); + mousepad_search_bar_highlight_schedule (bar); } @@ -434,8 +454,11 @@ mousepad_search_bar_highlight_schedule (MousepadSearchBar *bar) g_source_remove (bar-highlight_id); /* schedule a new timeout */ - bar-highlight_id = g_timeout_add_full (G_PRIORITY_LOW, HIGHTLIGHT_TIMEOUT, mousepad_search_bar_highlight_timeout, - bar, mousepad_search_bar_highlight_timeout_destroy); + if (bar-highlight_all) +{ + bar-highlight_id = g_timeout_add_full (G_PRIORITY_LOW, HIGHTLIGHT_TIMEOUT, mousepad_search_bar_highlight_timeout, + bar, mousepad_search_bar_highlight_timeout_destroy); +} } @@ -461,11 +484,7 @@ mousepad_search_bar_highlight_timeout (gpointer user_data) | MOUSEPAD_SEARCH_FLAGS_ITER_AREA_START | MOUSEPAD_SEARCH_FLAGS_ACTION_HIGHTLIGHT; - /* only clear when there is no text */ - if (!bar-highlight_all) -flags |= MOUSEPAD_SEARCH_FLAGS_ACTION_CLEANUP; - - /* hightlight */ + /* emit signal */ mousepad_search_bar_find_string (bar, flags); GDK_THREADS_LEAVE (); @@ -496,8 +515,7 @@ mousepad_search_bar_focus (MousepadSearchBar *bar) gtk_widget_grab_focus (bar-entry); /* update the highlight */ - if (bar-highlight_all) -mousepad_search_bar_highlight_schedule (bar); + mousepad_search_bar_highlight_schedule (bar);
[Xfce4-commits] mousepad:master * mousepad/mousepad-{dialog, window}.c: Show save as button in question dialog for readonly documents. Also add the modified readonly documents to the save-as queue
Updating branch refs/heads/master to 1d7bef769029aae39ddcecb6c529177393363dcf (commit) from f67680befa81f562943b591a7143e25baea1fb17 (commit) commit 1d7bef769029aae39ddcecb6c529177393363dcf Author: Nick Schermer n...@xfce.org Date: Sat Dec 8 10:46:08 2007 + * mousepad/mousepad-{dialog,window}.c: Show save as button in question dialog for readonly documents. Also add the modified readonly documents to the save-as queue when running save all. (Old svn revision: 26451) ChangeLog |7 +++ mousepad/mousepad-dialogs.c | 39 ++- mousepad/mousepad-dialogs.h |3 ++- mousepad/mousepad-window.c | 13 +++-- 4 files changed, 42 insertions(+), 20 deletions(-) diff --git a/ChangeLog b/ChangeLog index 724b54b..2c1a270 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,12 @@ 2007-12-08 Nick Schermer n...@xfce.org + * mousepad/mousepad-{dialog,window}.c: Show save as button in + question dialog for readonly documents. Also add the modified + readonly documents to the save-as queue when running save all. + + +2007-12-08 Nick Schermer n...@xfce.org + * mousepad/mousepad-{search-bar,window}.c: Remove highlight when hiding the search bar. Search ahead when opening the search bar. diff --git a/mousepad/mousepad-dialogs.c b/mousepad/mousepad-dialogs.c index adaffc3..3ec9dad 100644 --- a/mousepad/mousepad-dialogs.c +++ b/mousepad/mousepad-dialogs.c @@ -350,36 +350,41 @@ mousepad_dialogs_clear_recent (GtkWindow *parent) gint -mousepad_dialogs_save_changes (GtkWindow *parent) +mousepad_dialogs_save_changes (GtkWindow *parent, + gboolean readonly) { GtkWidget *dialog; GtkWidget *image; gint response; - /* the dialog icon */ - image = gtk_image_new_from_stock (GTK_STOCK_SAVE, GTK_ICON_SIZE_DIALOG); - gtk_widget_show (image); - /* create the question dialog */ dialog = gtk_message_dialog_new (parent, GTK_DIALOG_MODAL | GTK_DIALOG_DESTROY_WITH_PARENT, GTK_MESSAGE_OTHER, GTK_BUTTONS_NONE, _(Do you want to save the changes before closing?)); + gtk_window_set_title (GTK_WINDOW (dialog), _(Save Changes)); + gtk_dialog_add_action_widget (GTK_DIALOG (dialog), mousepad_util_image_button (GTK_STOCK_DELETE, _(_Don't Save)), MOUSEPAD_RESPONSE_DONT_SAVE); + gtk_dialog_add_buttons (GTK_DIALOG (dialog), GTK_STOCK_CANCEL, MOUSEPAD_RESPONSE_CANCEL, NULL); - gtk_dialog_add_action_widget (GTK_DIALOG (dialog), -mousepad_util_image_button (GTK_STOCK_DELETE, _(_Don't Save)), -MOUSEPAD_RESPONSE_DONT_SAVE); - - gtk_dialog_add_buttons (GTK_DIALOG (dialog), - GTK_STOCK_CANCEL, MOUSEPAD_RESPONSE_CANCEL, - GTK_STOCK_SAVE, MOUSEPAD_RESPONSE_SAVE, - NULL); + /* we show the save as button instead of save for readonly document */ + if (G_UNLIKELY (readonly)) +{ + image = gtk_image_new_from_stock (GTK_STOCK_SAVE_AS, GTK_ICON_SIZE_DIALOG); + gtk_dialog_add_buttons (GTK_DIALOG (dialog), GTK_STOCK_SAVE_AS, MOUSEPAD_RESPONSE_SAVE_AS, NULL); + gtk_dialog_set_default_response (GTK_DIALOG (dialog), MOUSEPAD_RESPONSE_SAVE_AS); +} + else +{ + image = gtk_image_new_from_stock (GTK_STOCK_SAVE, GTK_ICON_SIZE_DIALOG); + gtk_dialog_add_buttons (GTK_DIALOG (dialog), GTK_STOCK_SAVE, MOUSEPAD_RESPONSE_SAVE, NULL); + gtk_dialog_set_default_response (GTK_DIALOG (dialog), MOUSEPAD_RESPONSE_SAVE); +} - gtk_window_set_title (GTK_WINDOW (dialog), _(Save Changes)); + /* the dialog icon */ gtk_message_dialog_set_image (GTK_MESSAGE_DIALOG (dialog), image); - gtk_dialog_set_default_response (GTK_DIALOG (dialog), MOUSEPAD_RESPONSE_SAVE); + gtk_widget_show (image); - gtk_message_dialog_format_secondary_text (GTK_MESSAGE_DIALOG (dialog), -_(If you don't save the document, all the changes will be lost.)); + /* secondary text */ + gtk_message_dialog_format_secondary_text (GTK_MESSAGE_DIALOG (dialog), _(If you don't save the document, all the changes will be lost.)); /* run the dialog and wait for a response */ response = gtk_dialog_run (GTK_DIALOG (dialog)); diff --git a/mousepad/mousepad-dialogs.h b/mousepad/mousepad-dialogs.h index 5ecfc15..de24257 100644 --- a/mousepad/mousepad-dialogs.h +++ b/mousepad/mousepad-dialogs.h @@ -58,7 +58,8 @@ gboolean mousepad_dialogs_go_to (GtkWindow *parent, gboolean mousepad_dialogs_clear_recent (GtkWindow *parent); -gint mousepad_dialogs_save_changes (GtkWindow *parent); +gint mousepad_dialogs_save_changes (GtkWindow *parent, +gboolean readonly); gint
[Xfce4-commits] mousepad:master * mousepad/mousepad-undo.c: Remove testing messages.
Updating branch refs/heads/master to ccf616594ecd39b49bb632372c7cd28557a776f1 (commit) from d1075d569a475bc2e16dfaab0209e1e4d0c8dec0 (commit) commit ccf616594ecd39b49bb632372c7cd28557a776f1 Author: Nick Schermer n...@xfce.org Date: Mon Dec 10 19:47:45 2007 + * mousepad/mousepad-undo.c: Remove testing messages. (Old svn revision: 26455) ChangeLog|7 ++- mousepad/mousepad-undo.c |5 - 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/ChangeLog b/ChangeLog index dbc8aa4..61cccf7 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,4 +1,9 @@ -2007-12-08 Nick Schermer n...@xfce.org +2007-12-10 Nick Schermer n...@xfce.org + + * mousepad/mousepad-undo.c: Remove testing messages. + + +2007-12-10 Nick Schermer n...@xfce.org * mousepad/mousepad-window.c: Use the switch-page signal instead of a notify on the page property. diff --git a/mousepad/mousepad-undo.c b/mousepad/mousepad-undo.c index ab0adf0..2a98693 100644 --- a/mousepad/mousepad-undo.c +++ b/mousepad/mousepad-undo.c @@ -497,8 +497,6 @@ mousepad_undo_cache_to_step (MousepadUndo *undo) /* reset the cache */ mousepad_undo_cache_reset (undo); } - - g_message (%d steps, undo-n_steps); } @@ -814,9 +812,6 @@ mousepad_undo_save_point (MousepadUndo *undo) /* store the current needle position */ undo-saved = undo-needle; - - /* TODO remove */ - g_message (store save point); } ___ Xfce4-commits mailing list Xfce4-commits@xfce.org https://mail.xfce.org/mailman/listinfo/xfce4-commits
[Xfce4-commits] mousepad:master * mousepad/mousepad-window.c: Try to find the file encoding in the recent history, when opening a document that didn't pass the UTF-8 check.
Updating branch refs/heads/master to b93f219eb75efb3769f5d1a150831a4a1f09291d (commit) from ccf616594ecd39b49bb632372c7cd28557a776f1 (commit) commit b93f219eb75efb3769f5d1a150831a4a1f09291d Author: Nick Schermer n...@xfce.org Date: Wed Dec 12 09:29:50 2007 + * mousepad/mousepad-window.c: Try to find the file encoding in the recent history, when opening a document that didn't pass the UTF-8 check. (Old svn revision: 26460) ChangeLog |7 +++ mousepad/mousepad-window.c | 89 +++ 2 files changed, 79 insertions(+), 17 deletions(-) diff --git a/ChangeLog b/ChangeLog index 61cccf7..9ecd7a6 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2007-12-12 Nick Schermer n...@xfce.org + + * mousepad/mousepad-window.c: Try to find the file encoding in the + recent history, when opening a document that didn't pass the + UTF-8 check. + + 2007-12-10 Nick Schermer n...@xfce.org * mousepad/mousepad-undo.c: Remove testing messages. diff --git a/mousepad/mousepad-window.c b/mousepad/mousepad-window.c index 3fa577a..32cc765 100644 --- a/mousepad/mousepad-window.c +++ b/mousepad/mousepad-window.c @@ -184,6 +184,7 @@ static void mousepad_window_recent_manager_init (MousepadW static gboolean mousepad_window_recent_menu_idle (gpointeruser_data); static void mousepad_window_recent_menu_idle_destroy (gpointeruser_data); static void mousepad_window_recent_menu (MousepadWindow *window); +static const gchar *mousepad_window_recent_get_encoding (GtkRecentInfo *info); static void mousepad_window_recent_clear (MousepadWindow *window); /* dnd */ @@ -957,9 +958,12 @@ mousepad_window_open_file (MousepadWindow *window, gboolean succeed = FALSE; gint npages = 0, i; gint response; - const gchar *new_encoding; const gchar *opened_filename; + const gchar *new_encoding; GtkWidget*dialog; + gboolean encoding_from_recent = FALSE; + gchar*uri; + GtkRecentInfo*info; _mousepad_return_val_if_fail (MOUSEPAD_IS_WINDOW (window), FALSE); _mousepad_return_val_if_fail (filename != NULL *filename != '\0', FALSE); @@ -1023,6 +1027,43 @@ mousepad_window_open_file (MousepadWindow *window, /* clear the error */ g_clear_error (error); + /* try to lookup the encoding from the recent history */ + if (encoding_from_recent == FALSE) +{ + /* don't try this again */ + encoding_from_recent = TRUE; + + /* build uri */ + uri = g_filename_to_uri (filename, NULL, NULL); + if (G_LIKELY (uri != NULL)) +{ + /* try to lookup the recent item */ + info = gtk_recent_manager_lookup_item (window-recent_manager, uri, NULL); + + /* cleanup */ + g_free (uri); + + if (info) +{ + /* try to find the encoding */ + new_encoding = mousepad_window_recent_get_encoding (info); + + /* release */ + gtk_recent_info_unref (info); + + /* try again if the encoding looks usefull, else + * fall-trough and open encoding dialog */ + if (G_LIKELY (new_encoding != NULL)) +{ + /* set encoding */ + mousepad_file_set_encoding (document-file, new_encoding); + + goto try_open_again; +} +} +} +} + /* run the encoding dialog */ dialog = mousepad_encoding_dialog_new (GTK_WINDOW (window), document-file); @@ -1031,10 +1072,10 @@ mousepad_window_open_file (MousepadWindow *window, if (response == GTK_RESPONSE_OK) { - /* get the selected encoding */ + /* set the new encoding */ new_encoding = mousepad_encoding_dialog_get_encoding (MOUSEPAD_ENCODING_DIALOG (dialog)); - /* set the document encoding */ + /* set encoding */ mousepad_file_set_encoding (document-file, new_encoding); } @@ -2475,6 +2516,30 @@ mousepad_window_recent_menu (MousepadWindow *window) +static const gchar * +mousepad_window_recent_get_encoding (GtkRecentInfo *info) +{ + const gchar *description; + const gchar *encoding = NULL; + gint offset; + + /* get the description */ + description = gtk_recent_info_get_description (info); + if (G_LIKELY (description)) +{ + /* get the offset length: 'Encoding: ' */ + offset = strlen (_(Encoding)) + 2; + + /* check if the encoding string looks valid, if so, set it */ +
[Xfce4-commits] mousepad:master * mousepad/mousepad-window.c: Use the switch-page signal instead of a notify on the page property. * mousepad/mousepad-*: Remove deprecated tooltip api when compiled
Updating branch refs/heads/master to d1075d569a475bc2e16dfaab0209e1e4d0c8dec0 (commit) from 1d7bef769029aae39ddcecb6c529177393363dcf (commit) commit d1075d569a475bc2e16dfaab0209e1e4d0c8dec0 Author: Nick Schermer n...@xfce.org Date: Mon Dec 10 19:36:58 2007 + * mousepad/mousepad-window.c: Use the switch-page signal instead of a notify on the page property. * mousepad/mousepad-*: Remove deprecated tooltip api when compiled with Gtk+ = 2.12. * mousepad/mousepad-replace-dialog.c: Connect tab switch signal for updating the dialog status when switching tabs. * mousepad/mousepad-undo.c: Fix issues with the undo manager. It now works with a points system (chars: 1pt, space/tab: 10pts, new line: 25pts). A step contains 30pts, whole words and spaces are merged. This way the undo steps feel more consistent. Properly keep the number of visible undo steps 100. Store document save point in the undo manager, when you undo to this points the document will not be modified, but the history is not erased either when saving. * mousepad/Makefile.am: Add DGTK_DISABLE_DEPRECATED and DGDK_DISABLE_DEPRECATED. (Old svn revision: 26454) ChangeLog | 20 ++ mousepad/Makefile.am |2 + mousepad/mousepad-document.c |8 +- mousepad/mousepad-private.h|7 + mousepad/mousepad-replace-dialog.c | 30 ++- mousepad/mousepad-replace-dialog.h |2 + mousepad/mousepad-statusbar.c |2 +- mousepad/mousepad-undo.c | 621 +--- mousepad/mousepad-undo.h |2 + mousepad/mousepad-util.c |4 +- mousepad/mousepad-util.h |2 + mousepad/mousepad-window.c | 110 --- 12 files changed, 500 insertions(+), 310 deletions(-) diff --git a/ChangeLog b/ChangeLog index 2c1a270..dbc8aa4 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,25 @@ 2007-12-08 Nick Schermer n...@xfce.org + * mousepad/mousepad-window.c: Use the switch-page signal instead + of a notify on the page property. + * mousepad/mousepad-*: Remove deprecated tooltip api when compiled + with Gtk+ = 2.12. + * mousepad/mousepad-replace-dialog.c: Connect tab switch signal for + updating the dialog status when switching tabs. + * mousepad/mousepad-undo.c: Fix issues with the undo manager. It + now works with a points system (chars: 1pt, space/tab: 10pts, + new line: 25pts). A step contains 30pts, whole words and spaces + are merged. This way the undo steps feel more consistent. + Properly keep the number of visible undo steps 100. + Store document save point in the undo manager, when you undo to + this points the document will not be modified, but the history + is not erased either when saving. + * mousepad/Makefile.am: Add DGTK_DISABLE_DEPRECATED and + DGDK_DISABLE_DEPRECATED. + + +2007-12-08 Nick Schermer n...@xfce.org + * mousepad/mousepad-{dialog,window}.c: Show save as button in question dialog for readonly documents. Also add the modified readonly documents to the save-as queue when running save all. diff --git a/mousepad/Makefile.am b/mousepad/Makefile.am index 7e97461..1d1b787 100644 --- a/mousepad/Makefile.am +++ b/mousepad/Makefile.am @@ -11,6 +11,8 @@ INCLUDES = \ -DLIBEXECDIR=\$(libexecdir)\ \ -DPACKAGE_LOCALE_DIR=\$(localedir)\ \ -DG_DISABLE_DEPRECATED \ + -DGTK_DISABLE_DEPRECATED \ + -DGDK_DISABLE_DEPRECATED \ $(PLATFORM_CPPFLAGS) bin_PROGRAMS = \ diff --git a/mousepad/mousepad-document.c b/mousepad/mousepad-document.c index 9dce17c..f2d2b68 100644 --- a/mousepad/mousepad-document.c +++ b/mousepad/mousepad-document.c @@ -422,7 +422,7 @@ mousepad_document_filename_changed (MousepadDocument *document, gtk_label_set_text (GTK_LABEL (document-priv-label), utf8_basename); /* set the tab tooltip */ - mousepad_util_set_tooltip (document-priv-ebox, utf8_filename); + mousepad_widget_set_tooltip_text (document-priv-ebox, utf8_filename); /* update label color */ mousepad_document_label_color (document); @@ -545,7 +545,7 @@ mousepad_document_get_tab_label (MousepadDocument *document) /* the ebox */ document-priv-ebox = g_object_new (GTK_TYPE_EVENT_BOX, border-width, 2, visible-window, FALSE, NULL);
[Xfce4-commits] mousepad:master * Use G_DEFINE_TYPE. * Properly set the emission stage for all signals. * Remove some unused code. * Fix assert when dropping a file in the editor window. * Small typ
Updating branch refs/heads/master to a8924e11dad4f268f699ce42abd348ba4dcb2492 (commit) from b93f219eb75efb3769f5d1a150831a4a1f09291d (commit) commit a8924e11dad4f268f699ce42abd348ba4dcb2492 Author: Nick Schermer n...@xfce.org Date: Mon Jan 14 11:33:17 2008 + * Use G_DEFINE_TYPE. * Properly set the emission stage for all signals. * Remove some unused code. * Fix assert when dropping a file in the editor window. * Small typo in the menu tooltips. (Old svn revision: 26570) mousepad/mousepad-application.c | 27 +-- mousepad/mousepad-dbus.c| 26 +-- mousepad/mousepad-document.c| 32 +++-- mousepad/mousepad-encoding-dialog.c | 27 +-- mousepad/mousepad-file.c| 33 -- mousepad/mousepad-preferences.c | 25 +- mousepad/mousepad-print.c | 25 +- mousepad/mousepad-private.h |8 ++-- mousepad/mousepad-replace-dialog.c | 29 ++-- mousepad/mousepad-search-bar.c | 28 ++- mousepad/mousepad-statusbar.c | 29 +++- mousepad/mousepad-undo.c| 29 ++-- mousepad/mousepad-view.c| 25 +- mousepad/mousepad-window.c | 63 ++ 14 files changed, 62 insertions(+), 344 deletions(-) diff --git a/mousepad/mousepad-application.c b/mousepad/mousepad-application.c index da50fe0..b308d15 100644 --- a/mousepad/mousepad-application.c +++ b/mousepad/mousepad-application.c @@ -43,8 +43,6 @@ static voidmousepad_application_new_window (MousepadWindo - - struct _MousepadApplicationClass { GObjectClass __parent__; @@ -60,28 +58,7 @@ struct _MousepadApplication -static GObjectClass *mousepad_application_parent_class; - - - -GType -mousepad_application_get_type (void) -{ - static GType type = G_TYPE_INVALID; - - if (G_UNLIKELY (type == G_TYPE_INVALID)) -{ - type = g_type_register_static_simple (G_TYPE_OBJECT, -I_(MousepadApplication), -sizeof (MousepadApplicationClass), -(GClassInitFunc) mousepad_application_class_init, -sizeof (MousepadApplication), -(GInstanceInitFunc) mousepad_application_init, -0); -} - - return type; -} +G_DEFINE_TYPE (MousepadApplication, mousepad_application, G_TYPE_OBJECT); @@ -90,8 +67,6 @@ mousepad_application_class_init (MousepadApplicationClass *klass) { GObjectClass *gobject_class; - mousepad_application_parent_class = g_type_class_peek_parent (klass); - gobject_class = G_OBJECT_CLASS (klass); gobject_class-finalize = mousepad_application_finalize; } diff --git a/mousepad/mousepad-dbus.c b/mousepad/mousepad-dbus.c index e85389e..9b6380c 100644 --- a/mousepad/mousepad-dbus.c +++ b/mousepad/mousepad-dbus.c @@ -65,28 +65,7 @@ struct _MousepadDBusService -static GObjectClass *mousepad_dbus_service_parent_class; - - - -GType -mousepad_dbus_service_get_type (void) -{ - static GType type = G_TYPE_INVALID; - - if (G_UNLIKELY (type == G_TYPE_INVALID)) -{ - type = g_type_register_static_simple (G_TYPE_OBJECT, -I_(MousepadDBusService), -sizeof (MousepadDBusServiceClass), -(GClassInitFunc) mousepad_dbus_service_class_init, -sizeof (MousepadDBusService), -(GInstanceInitFunc) mousepad_dbus_service_init, -0); -} - - return type; -} +G_DEFINE_TYPE (MousepadDBusService, mousepad_dbus_service, G_TYPE_OBJECT); @@ -96,9 +75,6 @@ mousepad_dbus_service_class_init (MousepadDBusServiceClass *klass) extern const DBusGObjectInfo dbus_glib_mousepad_dbus_service_object_info; GObjectClass *gobject_class; - /* determine the parent type class */ - mousepad_dbus_service_parent_class = g_type_class_peek_parent (klass); - gobject_class = G_OBJECT_CLASS (klass); gobject_class-finalize = mousepad_dbus_service_finalize; diff --git a/mousepad/mousepad-document.c b/mousepad/mousepad-document.c index f2d2b68..d637297 100644 --- a/mousepad/mousepad-document.c +++ b/mousepad/mousepad-document.c @@ -103,8 +103,7 @@ struct _MousepadDocumentPrivate -static GObjectClass *mousepad_document_parent_class; -static guint document_signals[LAST_SIGNAL]; +static guint document_signals[LAST_SIGNAL]; @@ -116,24 +115,7 @@ mousepad_document_new (void) -GType -mousepad_document_get_type (void) -{ - static GType type =
[Xfce4-commits] mousepad:master * TODO: Update * mousepad/mousepad-{dialogs, window, file}.c: Check for external file modifications before saving. * ChangeLog: Update. * configure.in.in: Remove api
Updating branch refs/heads/master to 35ea349ad0c4ee3557c3c28bb7b5c30cb9fdfe22 (commit) from 2709fd15751d4197f8c260989b7069473dfae65f (commit) commit 35ea349ad0c4ee3557c3c28bb7b5c30cb9fdfe22 Author: Nick Schermer n...@xfce.org Date: Tue Jan 15 10:34:47 2008 + * TODO: Update * mousepad/mousepad-{dialogs,window,file}.c: Check for external file modifications before saving. * ChangeLog: Update. * configure.in.in: Remove api version and add support for a nano version. (Old svn revision: 26572) ChangeLog | 33 TODO| 37 ++--- configure.in.in | 10 ++-- mousepad/mousepad-dialogs.c | 31 +++- mousepad/mousepad-dialogs.h | 36 +++-- mousepad/mousepad-file.c| 18 -- mousepad/mousepad-window.c | 118 +- 7 files changed, 186 insertions(+), 97 deletions(-) diff --git a/ChangeLog b/ChangeLog index 9ecd7a6..88a5ec0 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,36 @@ +2008-01-15 Nick Schermer n...@xfce.org + + * TODO: Update + * mousepad/mousepad-{dialogs,window,file}.c: Check for external + file modifications before saving. + * ChangeLog: Update. + * configure.in.in: Remove api version and add support for a nano + version. + + +2008-01-14 Nick Schermer n...@xfce.org + + * configure.in.in, mousepad/mousepad-{preferences,print,window}.c, + mousepad/main.c: Drop libxfce4util as a dependency by using + GKeyFile. Binary size increased with only 1K and most likely more + people will use Mousepad when it's a Gtk+ only application. + * mousepad/mousepad-{window,dialogs}.c, Mousepad.desktop.in.in: Use + accessories-text-editor as icon name. + * icons/{16x16,24x24,scalable}/Makefile.am: Install symlinks from + Mousepad.{png,svg} to ccessories-text-editor.{png,svg}. + + +2008-01-14 Nick Schermer n...@xfce.org + + * mousepad/mousepad-*.c: Use G_DEFINE_TYPE for initializing objects. + * mousepad/mousepad-*.c: Properly set the emission stage for + all signals. + * mousepad/mousepad-*: Cleanup some unneeded code. + * mousepad/mousepad-window.c: Fix assert when dropping a file in + the editor window. + * mousepad/mousepad-window.c: Fix 2 small typos in the menu tooltips. + + 2007-12-12 Nick Schermer n...@xfce.org * mousepad/mousepad-window.c: Try to find the file encoding in the diff --git a/TODO b/TODO index db96516..8c8887f 100644 --- a/TODO +++ b/TODO @@ -3,41 +3,23 @@ be fixed (or ignored when irrelevant) before the nick_0_3 branch can move to trunk. When the branch enters trunk, it's important we work towards a stable version, so we can release a 0.2.90.1 (0.3 beta 1) version as soon as possible (if needed, independent -from the Xfce schedule). +from the Xfce release schedule). Interface = -- Tab font color when the file is modified or read only. - Test the application with a screen reader and add Atk objects where needed. -- Cleanup the menus and make them consistent. For example: we're - using both file and document atm. The name of the Go menu should - also be changed to something more descriptive. -- Make the mnemonic's consistent all over the application and make - sure they don't conflict inside a dialog/window. - Check the search and replace code for bugs. - Add option to disable the search feedback in the replace dialog (highlight, count matches, type-ahead). This can slow down mousepad - with large text files. - - -Undo - -- Need to fix a couple of issues here. I'm not really satisfied with - it right now. - - -Code - -- Check for code duplication and make sure the comments are worth - reading. + with (multiple) large documents. +- Transpose words works a bit odd sometimes. +- Improve replace (all) in selection. Saving and loading == -- Save All option. -- Check if the file is externally modified when switching tabs. - Cleanup and improve encoding support and order the encoding types. @@ -45,23 +27,16 @@ Other = - We need a cool Mousepad logo. - Write documentation. -- Session manager support. +- Session manager support (waiting for Gtk+ here). Testing and polishing = -- Profiling the startup time. We can possibly use Frederico's trick - to optimize the startup time: - http://primates.ximian.com/~federico/news-2006-03.html#09 - Profiling loading large files (Gtk/Pango has a problem here). This also locks some dialogs. - Checking for memory leaks. -- Make sure objects are unrefed when their parent is destroyed, Gtk+ - does not always take care of this. Feature === -- Maybe a plugin based system for syntax highlighting and GtkSpell. - We cannot use GtkSourceView with this implementation, because it - cannot attach
[Xfce4-commits] mousepad:master * Drop libxfce4util as dependency * Switch to accessories-text-editor as icon name
Updating branch refs/heads/master to 2709fd15751d4197f8c260989b7069473dfae65f (commit) from a8924e11dad4f268f699ce42abd348ba4dcb2492 (commit) commit 2709fd15751d4197f8c260989b7069473dfae65f Author: Nick Schermer n...@xfce.org Date: Mon Jan 14 16:49:57 2008 + * Drop libxfce4util as dependency * Switch to accessories-text-editor as icon name (Old svn revision: 26571) Mousepad.desktop.in.in |2 +- Mousepad.spec.in|2 - configure.in.in |5 +- icons/16x16/Makefile.am | 11 ++- icons/24x24/Makefile.am |5 + icons/scalable/Makefile.am |5 + mousepad/Makefile.am|2 - mousepad/main.c | 12 ++- mousepad/mousepad-application.c | 20 ++-- mousepad/mousepad-dialogs.c |3 +- mousepad/mousepad-preferences.c | 212 +-- mousepad/mousepad-preferences.h |2 - mousepad/mousepad-print.c | 64 - mousepad/mousepad-private.h |6 +- mousepad/mousepad-util.c| 81 +++ mousepad/mousepad-util.h|6 + mousepad/mousepad-window.c | 11 ++- 17 files changed, 295 insertions(+), 154 deletions(-) diff --git a/Mousepad.desktop.in.in b/Mousepad.desktop.in.in index 38a39eb..21fda29 100644 --- a/Mousepad.desktop.in.in +++ b/Mousepad.desktop.in.in @@ -5,7 +5,7 @@ _Name=Mousepad _Comment=Simple Text Editor _GenericName=Text Editor Exec=mousepad %F -Icon=mousepad +Icon=accessories-text-editor Terminal=false StartupNotify=true Type=Application diff --git a/Mousepad.spec.in b/Mousepad.spec.in index eaf1459..6261c2c 100644 --- a/Mousepad.spec.in +++ b/Mousepad.spec.in @@ -8,9 +8,7 @@ Source0:%{name}-%{version}.tar.gz Group: Applications/X11 BuildRoot: %{_tmppath}/%{name}-root Requires: gtk2 = @GTK_REQUIRED_VERSION@ -Requires: libxfce4util = @LIBXFCE4UTIL_REQUIRED_VERSION@ BuildRequires: gtk2-devel = @GTK_REQUIRED_VERSION@ -BuildRequires: libxfce4util-devel = @LIBXFCE4UTIL_REQUIRED_VERSION@ %description Mousepad is a simple text editor for the Xfce Desktop Environment. diff --git a/configure.in.in b/configure.in.in index 7099a24..74c44a5 100644 --- a/configure.in.in +++ b/configure.in.in @@ -69,8 +69,8 @@ AC_SUBST([MOUSEPAD_VERSION_MICRO]) dnl ** dnl *** Check for standard headers *** dnl ** -AC_CHECK_HEADERS([errno.h fcntl.h memory.h math.h stdlib.h string.h \ - sys/types.h sys/stat.h time.h unistd.h]) +AC_CHECK_HEADERS([errno.h fcntl.h libintl.h memory.h math.h stdlib.h \ + string.h sys/types.h sys/stat.h time.h unistd.h]) dnl ** dnl *** Check for i18n support *** @@ -84,7 +84,6 @@ XDT_CHECK_PACKAGE([GLIB], [glib-2.0], [2.12.0]) XDT_CHECK_PACKAGE([GMODULE], [gmodule-2.0], [2.12.0]) XDT_CHECK_PACKAGE([GTHREAD], [gthread-2.0], [2.12.0]) XDT_CHECK_PACKAGE([GTK], [gtk+-2.0], [2.10.0]) -XDT_CHECK_PACKAGE([LIBXFCE4UTIL], [libxfce4util-1.0], [4.4.0]) dnl ** dnl *** Optional support for D-BUS *** diff --git a/icons/16x16/Makefile.am b/icons/16x16/Makefile.am index 4fe130f..6cedaf6 100644 --- a/icons/16x16/Makefile.am +++ b/icons/16x16/Makefile.am @@ -1,10 +1,15 @@ # $Id$ -appsdir = $(datadir)/icons/hicolor/16x16/apps -apps_DATA =\ +iconsdir = $(datadir)/icons/hicolor/16x16/apps +icons_DATA = \ Mousepad.png +# install symlink +install-data-local: + $(mkinstalldirs) $(DESTDIR)$(iconsdir) + -( cd $(DESTDIR)$(iconsdir) ; ln -sf Mousepad.png accessories-text-editor.png ) + EXTRA_DIST = \ - $(apps_DATA) + $(icons_DATA) # vi:set ts=8 sw=8 noet ai nocindent syntax=automake: diff --git a/icons/24x24/Makefile.am b/icons/24x24/Makefile.am index 2608272..0a73503 100644 --- a/icons/24x24/Makefile.am +++ b/icons/24x24/Makefile.am @@ -4,6 +4,11 @@ iconsdir = $(datadir)/icons/hicolor/24x24/apps icons_DATA = \ Mousepad.png +# install symlink +install-data-local: + $(mkinstalldirs) $(DESTDIR)$(iconsdir) + -( cd $(DESTDIR)$(iconsdir) ; ln -sf Mousepad.png accessories-text-editor.png ) + EXTRA_DIST = \ $(icons_DATA) diff --git a/icons/scalable/Makefile.am b/icons/scalable/Makefile.am index 305a62c..b2a0019 100644 --- a/icons/scalable/Makefile.am +++ b/icons/scalable/Makefile.am @@ -4,6 +4,11 @@ iconsdir = $(datadir)/icons/hicolor/scalable/apps icons_DATA = \ Mousepad.svg +# install symlink +install-data-local: + $(mkinstalldirs)
[Xfce4-commits] mousepad:master * mousepad/mousepad-window.c: Update menu actions after a document is closed, so the detach action becomes insensitive when there is only one document openened.
Updating branch refs/heads/master to 9b4a2525a341187a8ea4bddfaeff3e07ef724773 (commit) from 35ea349ad0c4ee3557c3c28bb7b5c30cb9fdfe22 (commit) commit 9b4a2525a341187a8ea4bddfaeff3e07ef724773 Author: Nick Schermer n...@xfce.org Date: Tue Jan 15 10:59:07 2008 + * mousepad/mousepad-window.c: Update menu actions after a document is closed, so the detach action becomes insensitive when there is only one document openened. (Old svn revision: 26573) ChangeLog |7 +++ mousepad/mousepad-window.c |3 +++ 2 files changed, 10 insertions(+), 0 deletions(-) diff --git a/ChangeLog b/ChangeLog index 88a5ec0..c78a69d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,12 @@ 2008-01-15 Nick Schermer n...@xfce.org + * mousepad/mousepad-window.c: Update menu actions after a document + is closed, so the detach action becomes insensitive when there + is only one document openened. + + +2008-01-15 Nick Schermer n...@xfce.org + * TODO: Update * mousepad/mousepad-{dialogs,window,file}.c: Check for external file modifications before saving. diff --git a/mousepad/mousepad-window.c b/mousepad/mousepad-window.c index debca09..edf36b2 100644 --- a/mousepad/mousepad-window.c +++ b/mousepad/mousepad-window.c @@ -1420,6 +1420,9 @@ mousepad_window_notebook_removed (GtkNotebook *notebook, /* update the go menu */ mousepad_window_update_gomenu (window); + + /* update action entries */ + mousepad_window_update_actions (window); } } ___ Xfce4-commits mailing list Xfce4-commits@xfce.org https://mail.xfce.org/mailman/listinfo/xfce4-commits
[Xfce4-commits] mousepad:master * mousepad/mousepad-search-bar.c: Select the text in the search entry when focussing the search bar (Ctrl+F). * mousepad/mousepad-window.c: Set default keybindings of
Updating branch refs/heads/master to 790cd28e036aec098aaee8cc03b101f0c436580d (commit) from 59d55f4852cdfaf811f51c97927defdb1e197d5b (commit) commit 790cd28e036aec098aaee8cc03b101f0c436580d Author: Nick Schermer n...@xfce.org Date: Sun Feb 17 12:08:21 2008 + * mousepad/mousepad-search-bar.c: Select the text in the search entry when focussing the search bar (Ctrl+F). * mousepad/mousepad-window.c: Set default keybindings of Find Next and Find Previous to F3 and Shft+F3. (Old svn revision: 26621) ChangeLog |8 mousepad/mousepad-search-bar.c |3 +++ mousepad/mousepad-window.c |4 ++-- 3 files changed, 13 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 5ef3300..11f34d4 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2008-02-17 Nick Schermer n...@xfce.org + + * mousepad/mousepad-search-bar.c: Select the text in the search + entry when focussing the search bar (Ctrl+F). + * mousepad/mousepad-window.c: Set default keybindings of Find Next + and Find Previous to F3 and Shft+F3. + + 2008-01-15 Nick Schermer n...@xfce.org * configure.in.in, mousepad/Makefile.am: Remove gmodule from the diff --git a/mousepad/mousepad-search-bar.c b/mousepad/mousepad-search-bar.c index 803a5a2..1b8ee15 100644 --- a/mousepad/mousepad-search-bar.c +++ b/mousepad/mousepad-search-bar.c @@ -499,6 +499,9 @@ mousepad_search_bar_focus (MousepadSearchBar *bar) /* update the highlight */ mousepad_search_bar_highlight_schedule (bar); + + /* select the entire entry */ + gtk_editable_select_region (GTK_EDITABLE (bar-entry), 0, -1); } diff --git a/mousepad/mousepad-window.c b/mousepad/mousepad-window.c index 78ae43e..66ee859 100644 --- a/mousepad/mousepad-window.c +++ b/mousepad/mousepad-window.c @@ -415,8 +415,8 @@ static const GtkActionEntry action_entries[] = { select-all, GTK_STOCK_SELECT_ALL, NULL, NULL, N_(Select the text in the entire document), G_CALLBACK (mousepad_window_action_select_all), }, { change-selection, NULL, N_(Change the selection), NULL, N_(Change a normal selection into a column selection and vice versa), G_CALLBACK (mousepad_window_action_change_selection), }, { find, GTK_STOCK_FIND, NULL, NULL, N_(Search for text), G_CALLBACK (mousepad_window_action_find), }, -{ find-next, NULL, N_(Find _Next), NULL, N_(Search forwards for the same text), G_CALLBACK (mousepad_window_action_find_next), }, -{ find-previous, NULL, N_(Find _Previous), NULL, N_(Search backwards for the same text), G_CALLBACK (mousepad_window_action_find_previous), }, +{ find-next, NULL, N_(Find _Next), F3, N_(Search forwards for the same text), G_CALLBACK (mousepad_window_action_find_next), }, +{ find-previous, NULL, N_(Find _Previous), shiftF3, N_(Search backwards for the same text), G_CALLBACK (mousepad_window_action_find_previous), }, { replace, GTK_STOCK_FIND_AND_REPLACE, N_(Find and Rep_lace...), NULL, N_(Search for and replace text), G_CALLBACK (mousepad_window_action_replace), }, { view-menu, NULL, N_(_View), NULL, NULL, NULL, }, ___ Xfce4-commits mailing list Xfce4-commits@xfce.org https://mail.xfce.org/mailman/listinfo/xfce4-commits
[Xfce4-commits] mousepad:master * mousepad/mousepad-file.c: Don't set an error and return false on externally modified when the file does not exist. This fixes an error when saving a new file. * mou
Updating branch refs/heads/master to e6deae974c002619ee11c3d68d92ec768b235ac5 (commit) from 790cd28e036aec098aaee8cc03b101f0c436580d (commit) commit e6deae974c002619ee11c3d68d92ec768b235ac5 Author: Nick Schermer n...@xfce.org Date: Sun Mar 2 13:51:40 2008 + * mousepad/mousepad-file.c: Don't set an error and return false on externally modified when the file does not exist. This fixes an error when saving a new file. * mousepad/mousepad-file.c: Emit signal when the readonly status changes. * mousepad/mousepad-document.c: Use the readonly signal to update the label color. This fixes a readonly-colored label when saving a new file. (Old svn revision: 26656) ChangeLog| 12 +++ mousepad/mousepad-document.c | 23 - mousepad/mousepad-file.c | 72 +++-- 3 files changed, 80 insertions(+), 27 deletions(-) diff --git a/ChangeLog b/ChangeLog index 11f34d4..fcdbe88 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,15 @@ +2008-03-02 Nick Schermer n...@xfce.org + + * mousepad/mousepad-file.c: Don't set an error and return false on + externally modified when the file does not exist. This fixes + an error when saving a new file. + * mousepad/mousepad-file.c: Emit signal when the readonly status + changes. + * mousepad/mousepad-document.c: Use the readonly signal to update + the label color. This fixes a readonly-colored label when saving + a new file. + + 2008-02-17 Nick Schermer n...@xfce.org * mousepad/mousepad-search-bar.c: Select the text in the search diff --git a/mousepad/mousepad-document.c b/mousepad/mousepad-document.c index d637297..fefab92 100644 --- a/mousepad/mousepad-document.c +++ b/mousepad/mousepad-document.c @@ -242,6 +242,7 @@ mousepad_document_init (MousepadDocument *document) g_signal_connect (G_OBJECT (document-buffer), notify::cursor-position, G_CALLBACK (mousepad_document_notify_cursor_position), document); g_signal_connect (G_OBJECT (document-buffer), notify::has-selection, G_CALLBACK (mousepad_document_notify_has_selection), document); g_signal_connect_swapped (G_OBJECT (document-buffer), modified-changed, G_CALLBACK (mousepad_document_label_color), document); + g_signal_connect_swapped (G_OBJECT (document-file), readonly-changed, G_CALLBACK (mousepad_document_label_color), document); g_signal_connect (G_OBJECT (document-textview), notify::overwrite, G_CALLBACK (mousepad_document_notify_overwrite), document); g_signal_connect (G_OBJECT (document-textview), drag-data-received, G_CALLBACK (mousepad_document_drag_data_received), document); } @@ -415,9 +416,9 @@ mousepad_document_filename_changed (MousepadDocument *document, static void mousepad_document_label_color (MousepadDocument *document) { - const GdkColor green = {0, 0x, 0x, 0x}; - const GdkColor red = {0, 0x, 0x, 0x}; - gboolean readonly, modified; + GdkColor green = {0, 0x, 0x, 0x}; + GdkColor red = {0, 0x, 0x, 0x}; + GdkColor *color; _mousepad_return_if_fail (MOUSEPAD_IS_DOCUMENT (document)); _mousepad_return_if_fail (GTK_IS_TEXT_BUFFER (document-buffer)); @@ -425,13 +426,17 @@ mousepad_document_label_color (MousepadDocument *document) if (document-priv-label) { - /* get states */ - readonly = mousepad_file_get_read_only (document-file); - modified = gtk_text_buffer_get_modified (document-buffer); - + /* label color */ + if (gtk_text_buffer_get_modified (document-buffer)) +color = green; + else if (mousepad_file_get_read_only (document-file)) +color = red; + else +color = NULL; + /* update colors */ - gtk_widget_modify_fg (document-priv-label, GTK_STATE_NORMAL, modified ? red : (readonly ? green : NULL)); - gtk_widget_modify_fg (document-priv-label, GTK_STATE_ACTIVE, modified ? red : (readonly ? green : NULL)); + gtk_widget_modify_fg (document-priv-label, GTK_STATE_NORMAL, color); + gtk_widget_modify_fg (document-priv-label, GTK_STATE_ACTIVE, color); } } diff --git a/mousepad/mousepad-file.c b/mousepad/mousepad-file.c index 6ae1d6f..81fec42 100644 --- a/mousepad/mousepad-file.c +++ b/mousepad/mousepad-file.c @@ -25,6 +25,9 @@ #ifdef HAVE_STRING_H #include string.h #endif +#ifdef HAVE_ERRNO_H +#include errno.h +#endif #include glib.h #include glib/gstdio.h @@ -41,6 +44,7 @@ enum { /* EXTERNALLY_MODIFIED, */ FILENAME_CHANGED, + READONLY_CHANGED, LAST_SIGNAL }; @@ -77,6 +81,8 @@ struct _MousepadFile static void mousepad_file_class_init (MousepadFileClass *klass); static void mousepad_file_init (MousepadFile *file); static void mousepad_file_finalize (GObject*object); +static void
[Xfce4-commits] mousepad:master * mousepad/mousepad-document.c: Swap the colors of readonly and modified tabs. Red is modified and green readonly.
Updating branch refs/heads/master to 73c4f9cde2db6826c690d2b19eab715bd493c704 (commit) from e6deae974c002619ee11c3d68d92ec768b235ac5 (commit) commit 73c4f9cde2db6826c690d2b19eab715bd493c704 Author: Nick Schermer n...@xfce.org Date: Mon Mar 10 19:52:22 2008 + * mousepad/mousepad-document.c: Swap the colors of readonly and modified tabs. Red is modified and green readonly. (Old svn revision: 26674) ChangeLog|6 ++ mousepad/mousepad-document.c |4 ++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index fcdbe88..b864971 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2008-03-10 Nick Schermer n...@xfce.org + + * mousepad/mousepad-document.c: Swap the colors of readonly and + modified tabs. Red is modified and green readonly. + + 2008-03-02 Nick Schermer n...@xfce.org * mousepad/mousepad-file.c: Don't set an error and return false on diff --git a/mousepad/mousepad-document.c b/mousepad/mousepad-document.c index fefab92..770bf88 100644 --- a/mousepad/mousepad-document.c +++ b/mousepad/mousepad-document.c @@ -428,9 +428,9 @@ mousepad_document_label_color (MousepadDocument *document) { /* label color */ if (gtk_text_buffer_get_modified (document-buffer)) -color = green; - else if (mousepad_file_get_read_only (document-file)) color = red; + else if (mousepad_file_get_read_only (document-file)) +color = green; else color = NULL; ___ Xfce4-commits mailing list Xfce4-commits@xfce.org https://mail.xfce.org/mailman/listinfo/xfce4-commits
[Xfce4-commits] mousepad:master * configure.in.in, mousepad/Makefile.am: Remove gmodule from the library list, is not used. Add glib to make sure it's linked. * mousepad/mousepad-window.c: Use the
Updating branch refs/heads/master to 59d55f4852cdfaf811f51c97927defdb1e197d5b (commit) from 9b4a2525a341187a8ea4bddfaeff3e07ef724773 (commit) commit 59d55f4852cdfaf811f51c97927defdb1e197d5b Author: Nick Schermer n...@xfce.org Date: Tue Jan 15 18:23:21 2008 + * configure.in.in, mousepad/Makefile.am: Remove gmodule from the library list, is not used. Add glib to make sure it's linked. * mousepad/mousepad-window.c: Use the HOME environment variable to search for the templates path, fallback on g_get_homedir. * MousepadHelp.in: Improve script to find other browsers too, instead of only using exo-open. * mousepad/mousepad-preferences: Improve the performace of loading and saving a bit. Loading now directly writes to the internal value array. Could be a bit tricky, we'll see. * mousepad/mousepad-{preferences,print}.c: Use g_key_file_{get, set}_value instead of g_key_file_{get,set}_string, should be a bit faster. * mousepad/mousepad-window.c: Be more secure when loading tab sizes. * po/mousepad.pot: Update. (Old svn revision: 26574) ChangeLog | 18 ++ MousepadHelp.in | 54 +- configure.in.in |1 - mousepad/Makefile.am|4 +- mousepad/mousepad-file.c|2 +- mousepad/mousepad-preferences.c | 192 - mousepad/mousepad-print.c |4 +- mousepad/mousepad-window.c | 51 ++--- po/mousepad.pot | 462 --- 9 files changed, 426 insertions(+), 362 deletions(-) diff --git a/ChangeLog b/ChangeLog index c78a69d..5ef3300 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,23 @@ 2008-01-15 Nick Schermer n...@xfce.org + * configure.in.in, mousepad/Makefile.am: Remove gmodule from the + library list, is not used. Add glib to make sure it's linked. + * mousepad/mousepad-window.c: Use the HOME environment variable + to search for the templates path, fallback on g_get_homedir. + * MousepadHelp.in: Improve script to find other browsers too, + instead of only using exo-open. + * mousepad/mousepad-preferences: Improve the performace of loading + and saving a bit. Loading now directly writes to the internal + value array. Could be a bit tricky, we'll see. + * mousepad/mousepad-{preferences,print}.c: Use g_key_file_{get, + set}_value instead of g_key_file_{get,set}_string, should be a + bit faster. + * mousepad/mousepad-window.c: Be more secure when loading tab sizes. + * po/mousepad.pot: Update. + + +2008-01-15 Nick Schermer n...@xfce.org + * mousepad/mousepad-window.c: Update menu actions after a document is closed, so the detach action becomes insensitive when there is only one document openened. diff --git a/MousepadHelp.in b/MousepadHelp.in index 773b8a0..7da5051 100644 --- a/MousepadHelp.in +++ b/MousepadHelp.in @@ -21,7 +21,9 @@ # HELPDIR=@datadir@/doc/Mousepad/html +APPLICATIONS=exo-open firefox epiphany opera galeon mozilla konqueror dillo +# try to find a language if test -n $LC_ALL; then LC=$LC_ALL elif test -n $LANG; then @@ -30,22 +32,66 @@ else LC=C fi +# set the document or use index.html if test -n $1; then HELPFILE=$1.html else HELPFILE=index.html fi +# test if the file exists, fallback on the C language or the C/index.html file if test -r $HELPDIR/$LC/$HELPFILE; then - URL=$HELPDIR/$LC/$HELPFILE + URL=file://$HELPDIR/$LC/$HELPFILE elif test -r $HELPDIR/`echo $LC | sed 's/\(..\)_.*/\1/'`/$HELPFILE; then - URL=$HELPDIR/`echo $LC | sed 's/\(..\)_.*/\1/'`/$HELPFILE + URL=file://$HELPDIR/`echo $LC | sed 's/\(..\)_.*/\1/'`/$HELPFILE else - URL=$HELPDIR/C/index.html + URL=file://$HELPDIR/C/index.html fi +# jump to a section if provided [ -n $2 ] URL=$URL#$2 -exec exo-open --launch WebBrowser file://$URL +# find a suitable browser to launch if no BROWSER variable is set +if [ x$BROWSER = x ]; then + for i in $APPLICATIONS; do +# find the application in the path +testapp=$(which $i 2/dev/null) +if test -f $testapp; then + # use the application and break + BROWSER=$i + break +fi + done +fi + +# tell the use if no suitable browser was found +if [ x$BROWSER = x ]; then + # print warning and leave + echo MousepadHelp: Could not find a browser to use. Please set the BROWSER variable. + exit 1 +fi + +# run the browser +case $BROWSER in + exo-open) +$BROWSER --launch WebBrowser $URL + ;; + opera*) +$BROWSER -remote openURL\($URL,new-window\) || $BROWSER $URL + ;; + firefox*) +$BROWSER -a firefox -remote openurl\($URL,new-window\) || $BROWSER $URL + ;; + communicator*|netscape|mozilla*|phoenix*|firebird*) +$BROWSER -remote openurl\($URL,new-window\) || $BROWSER $URL + ;; + *) +$BROWSER $URL; + ;; +esac + +# leave
[Xfce4-commits] mousepad:master mousepad/nick: update french translation
Updating branch refs/heads/master to 1a06210de348a7ef5e54262a43dd0410e4b91f62 (commit) from 73c4f9cde2db6826c690d2b19eab715bd493c704 (commit) commit 1a06210de348a7ef5e54262a43dd0410e4b91f62 Author: Mike Massonnet mmasson...@xfce.org Date: Mon Mar 31 11:46:16 2008 + mousepad/nick: update french translation (Old svn revision: 26700) po/ChangeLog |5 + po/LINGUAS |1 + po/{mousepad.pot = fr.po} | 424 ++-- 3 files changed, 221 insertions(+), 209 deletions(-) diff --git a/po/ChangeLog b/po/ChangeLog index e69de29..636e86b 100644 --- a/po/ChangeLog +++ b/po/ChangeLog @@ -0,0 +1,5 @@ +2008-03-31 Mike Massonnet mmasson...@gmail.com + + * fr.po, LINGUAS: Add French translation from some guy who passed it to + another guy on IRC + diff --git a/po/LINGUAS b/po/LINGUAS index a0f7499..83c0d38 100644 --- a/po/LINGUAS +++ b/po/LINGUAS @@ -1 +1,2 @@ # set of available languages (in alphabetic order) +fr diff --git a/po/mousepad.pot b/po/fr.po similarity index 66% copy from po/mousepad.pot copy to po/fr.po index bd2931b..fa6205b 100644 --- a/po/mousepad.pot +++ b/po/fr.po @@ -1,38 +1,36 @@ -# SOME DESCRIPTIVE TITLE. -# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER -# This file is distributed under the same license as the PACKAGE package. -# FIRST AUTHOR EMAIL@ADDRESS, YEAR. +# French translation of mousepad 0.3 +# Distributed under the same license as mousepad +# # -#, fuzzy msgid msgstr -Project-Id-Version: PACKAGE VERSION\n +Project-Id-Version: mousepad 0.3\n Report-Msgid-Bugs-To: \n POT-Creation-Date: 2008-01-15 12:38+0100\n -PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n +PO-Revision-Date: 2008-03-31 13:48+0200\n Last-Translator: FULL NAME EMAIL@ADDRESS\n -Language-Team: LANGUAGE l...@li.org\n +Language-Team: French NONE\n MIME-Version: 1.0\n -Content-Type: text/plain; charset=CHARSET\n +Content-Type: text/plain; charset=utf-8\n Content-Transfer-Encoding: 8bit\n -Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\n +Plural-Forms: nplurals=2; plural=(n 1);\n #: ../mousepad/main.c:54 msgid Do not register with the D-BUS session message bus -msgstr +msgstr Ne pas utiliser D-BUS #: ../mousepad/main.c:55 msgid Quit a running Mousepad instance -msgstr +msgstr Quitter une instance de Mousepad déjà en cours #: ../mousepad/main.c:57 msgid Print version information and exit -msgstr +msgstr Afficher les informations de version et quitter #. default application name #: ../mousepad/main.c:81 ../Mousepad.desktop.in.in.h:1 msgid Mousepad -msgstr +msgstr Mousepad #. initialize gtk+ #: ../mousepad/main.c:93 @@ -42,285 +40,288 @@ msgstr #. no error message, the gui initialization failed #: ../mousepad/main.c:99 msgid Failed to open display. -msgstr +msgstr Échec à l'ouverture de l'affichage. #: ../mousepad/main.c:116 msgid The Xfce development team. All rights reserved. -msgstr +msgstr L'équipe de développement Xfce. Tous droits réservés. #: ../mousepad/main.c:117 #, c-format msgid Please report bugs to %s. -msgstr +msgstr Merci de rapporter les bogues à %s. #: ../mousepad/mousepad-dialogs.c:41 msgid Mousepad is a fast text editor for the Xfce Desktop Environment. -msgstr +msgstr Mousepad est un éditeur de texte rapide pour l'environnement de bureau Xfce. #: ../mousepad/mousepad-dialogs.c:50 msgid translator-credits -msgstr +msgstr Crédits des traducteurs #. display an error message to the user #: ../mousepad/mousepad-dialogs.c:125 msgid Failed to open the documentation browser -msgstr +msgstr Impossible d'ouvrir le navigateur de documents #. build dialog #: ../mousepad/mousepad-dialogs.c:143 msgid Select Tab Size -msgstr +msgstr Sélectionnez la taille des onglets #. build the dialog #: ../mousepad/mousepad-dialogs.c:224 msgid Go To -msgstr +msgstr Allez vers #: ../mousepad/mousepad-dialogs.c:246 msgid _Line number: -msgstr +msgstr Numéro de _ligne #: ../mousepad/mousepad-dialogs.c:265 msgid C_olumn number: -msgstr +msgstr Numéro de _colonne #: ../mousepad/mousepad-dialogs.c:323 msgid Remove all entries from the documents history? -msgstr +msgstr Êtes-vous certain de vouloir effacer la liste des documents récents ? #: ../mousepad/mousepad-dialogs.c:328 msgid Clear Documents History -msgstr +msgstr Effacer l'historique #: ../mousepad/mousepad-dialogs.c:331 msgid Clearing the documents history will permanently remove all currently listed entries. msgstr +Effacer l'historique des documents, supprimera définitivement toutes les entrées actuellement répertoriées. + #: ../mousepad/mousepad-dialogs.c:362 msgid Do you want to save the changes before closing? -msgstr +msgstr Désirez-vous enregistrer les modifications ? #: ../mousepad/mousepad-dialogs.c:363 msgid Save Changes -msgstr +msgstr Enregistrer #: ../mousepad/mousepad-dialogs.c:364 msgid _Don't Save -msgstr +msgstr _Ne pas
[Xfce4-commits] mousepad:master Fix compilation with pango.
Updating branch refs/heads/master to c5c4bd8a3f8c8a0ce94e806e027d68dac540cec0 (commit) from 375a246bf9f38733f368bfa05163734119b54168 (commit) commit c5c4bd8a3f8c8a0ce94e806e027d68dac540cec0 Author: Nick Schermer n...@xfce.org Date: Wed Feb 10 12:59:50 2010 +0100 Fix compilation with pango. mousepad/mousepad-print.c | 14 +- po/POTFILES.in|1 + 2 files changed, 14 insertions(+), 1 deletions(-) diff --git a/mousepad/mousepad-print.c b/mousepad/mousepad-print.c index 04aa284..c2ae215 100644 --- a/mousepad/mousepad-print.c +++ b/mousepad/mousepad-print.c @@ -445,7 +445,11 @@ mousepad_print_begin_print (GtkPrintOperation *operation, for (i = 0; i pango_layout_get_line_count (print-layout); i++) { /* get the line */ +#if PANGO_VERSION_CHECK (1, 16, 0) line = pango_layout_get_line_readonly (print-layout, i); +#else + line = pango_layout_get_line (print-layout, i); +#endif /* if we don't wrap lines, skip the lines that don't start a paragraph */ if (print-text_wrapping == FALSE line-is_paragraph_start == FALSE) @@ -559,7 +563,11 @@ mousepad_print_draw_page (GtkPrintOperation *operation, for (i = start, y = print-y_offset; i end; i++) { /* get the line */ +#if PANGO_VERSION_CHECK (1, 16, 0) line = pango_layout_get_line_readonly (print-layout, i); +#else + line = pango_layout_get_line (print-layout, i); +#endif /* if we don't wrap lines, skip the lines that don't start a paragraph */ if (print-text_wrapping == FALSE line-is_paragraph_start == FALSE) @@ -596,7 +604,11 @@ mousepad_print_draw_page (GtkPrintOperation *operation, cairo_move_to (cr, 0, y); /* pick the first line and draw it on the cairo context */ - line = pango_layout_get_line_readonly (layout, 0); +#if PANGO_VERSION_CHECK (1, 16, 0) + line = pango_layout_get_line_readonly (print-layout, 0); +#else + line = pango_layout_get_line (print-layout, 0); +#endif pango_cairo_show_layout_line (cr, line); } } diff --git a/po/POTFILES.in b/po/POTFILES.in index 022d836..a62d797 100644 --- a/po/POTFILES.in +++ b/po/POTFILES.in @@ -7,6 +7,7 @@ mousepad/mousepad-dbus.c mousepad/mousepad-dialogs.c mousepad/mousepad-document.c mousepad/mousepad-encoding-dialog.c +mousepad/mousepad-encoding.c mousepad/mousepad-file.c mousepad/mousepad-preferences.c mousepad/mousepad-print.c ___ Xfce4-commits mailing list Xfce4-commits@xfce.org https://mail.xfce.org/mailman/listinfo/xfce4-commits
[Xfce4-commits] mousepad:master Revert French translation. Add a note inside TRANSLATORS
Updating branch refs/heads/master to d7fce4e8e9890bee3cde1d8afa549b320ca0bb4c (commit) from 1a06210de348a7ef5e54262a43dd0410e4b91f62 (commit) commit d7fce4e8e9890bee3cde1d8afa549b320ca0bb4c Author: Mike Massonnet mmasson...@xfce.org Date: Tue Apr 1 07:11:50 2008 + Revert French translation. Add a note inside TRANSLATORS (Old svn revision: 26701) po/ChangeLog |5 - po/LINGUAS |1 - po/TRANSLATORS |4 + po/fr.po | 908 4 files changed, 4 insertions(+), 914 deletions(-) diff --git a/po/ChangeLog b/po/ChangeLog index 636e86b..e69de29 100644 --- a/po/ChangeLog +++ b/po/ChangeLog @@ -1,5 +0,0 @@ -2008-03-31 Mike Massonnet mmasson...@gmail.com - - * fr.po, LINGUAS: Add French translation from some guy who passed it to - another guy on IRC - diff --git a/po/LINGUAS b/po/LINGUAS index 83c0d38..a0f7499 100644 --- a/po/LINGUAS +++ b/po/LINGUAS @@ -1,2 +1 @@ # set of available languages (in alphabetic order) -fr diff --git a/po/TRANSLATORS b/po/TRANSLATORS new file mode 100644 index 000..b0ccff4 --- /dev/null +++ b/po/TRANSLATORS @@ -0,0 +1,4 @@ +Note to translators: +~~~ +Don't translate this branch until it gets moved to trunk. Thanks. + diff --git a/po/fr.po b/po/fr.po deleted file mode 100644 index fa6205b..000 --- a/po/fr.po +++ /dev/null @@ -1,908 +0,0 @@ -# French translation of mousepad 0.3 -# Distributed under the same license as mousepad -# -# -msgid -msgstr -Project-Id-Version: mousepad 0.3\n -Report-Msgid-Bugs-To: \n -POT-Creation-Date: 2008-01-15 12:38+0100\n -PO-Revision-Date: 2008-03-31 13:48+0200\n -Last-Translator: FULL NAME EMAIL@ADDRESS\n -Language-Team: French NONE\n -MIME-Version: 1.0\n -Content-Type: text/plain; charset=utf-8\n -Content-Transfer-Encoding: 8bit\n -Plural-Forms: nplurals=2; plural=(n 1);\n - -#: ../mousepad/main.c:54 -msgid Do not register with the D-BUS session message bus -msgstr Ne pas utiliser D-BUS - -#: ../mousepad/main.c:55 -msgid Quit a running Mousepad instance -msgstr Quitter une instance de Mousepad déjà en cours - -#: ../mousepad/main.c:57 -msgid Print version information and exit -msgstr Afficher les informations de version et quitter - -#. default application name -#: ../mousepad/main.c:81 ../Mousepad.desktop.in.in.h:1 -msgid Mousepad -msgstr Mousepad - -#. initialize gtk+ -#: ../mousepad/main.c:93 -msgid [FILES...] -msgstr - -#. no error message, the gui initialization failed -#: ../mousepad/main.c:99 -msgid Failed to open display. -msgstr Échec à l'ouverture de l'affichage. - -#: ../mousepad/main.c:116 -msgid The Xfce development team. All rights reserved. -msgstr L'équipe de développement Xfce. Tous droits réservés. - -#: ../mousepad/main.c:117 -#, c-format -msgid Please report bugs to %s. -msgstr Merci de rapporter les bogues à %s. - -#: ../mousepad/mousepad-dialogs.c:41 -msgid Mousepad is a fast text editor for the Xfce Desktop Environment. -msgstr Mousepad est un éditeur de texte rapide pour l'environnement de bureau Xfce. - -#: ../mousepad/mousepad-dialogs.c:50 -msgid translator-credits -msgstr Crédits des traducteurs - -#. display an error message to the user -#: ../mousepad/mousepad-dialogs.c:125 -msgid Failed to open the documentation browser -msgstr Impossible d'ouvrir le navigateur de documents - -#. build dialog -#: ../mousepad/mousepad-dialogs.c:143 -msgid Select Tab Size -msgstr Sélectionnez la taille des onglets - -#. build the dialog -#: ../mousepad/mousepad-dialogs.c:224 -msgid Go To -msgstr Allez vers - -#: ../mousepad/mousepad-dialogs.c:246 -msgid _Line number: -msgstr Numéro de _ligne - -#: ../mousepad/mousepad-dialogs.c:265 -msgid C_olumn number: -msgstr Numéro de _colonne - -#: ../mousepad/mousepad-dialogs.c:323 -msgid Remove all entries from the documents history? -msgstr Êtes-vous certain de vouloir effacer la liste des documents récents ? - -#: ../mousepad/mousepad-dialogs.c:328 -msgid Clear Documents History -msgstr Effacer l'historique - -#: ../mousepad/mousepad-dialogs.c:331 -msgid -Clearing the documents history will permanently remove all currently listed -entries. -msgstr -Effacer l'historique des documents, supprimera définitivement toutes les entrées actuellement répertoriées. - - -#: ../mousepad/mousepad-dialogs.c:362 -msgid Do you want to save the changes before closing? -msgstr Désirez-vous enregistrer les modifications ? - -#: ../mousepad/mousepad-dialogs.c:363 -msgid Save Changes -msgstr Enregistrer - -#: ../mousepad/mousepad-dialogs.c:364 -msgid _Don't Save -msgstr _Ne pas enregistrer - -#. secondary text -#: ../mousepad/mousepad-dialogs.c:386 -msgid If you don't save the document, all the changes will be lost. -msgstr Si le document n'est pas sauvegardé, vos modifications seront perdues. - -#: ../mousepad/mousepad-dialogs.c:408 -msgid -The document has been externally modified. Do you want to continue saving? -msgstr -Le document a été modifié en externe.
[Xfce4-commits] mousepad:master Don't disable deprecated Gtk functions.
Updating branch refs/heads/master to 1972a36499a3644bc32067bb748a79f0d4523257 (commit) from c5c4bd8a3f8c8a0ce94e806e027d68dac540cec0 (commit) commit 1972a36499a3644bc32067bb748a79f0d4523257 Author: Nick Schermer n...@xfce.org Date: Sat Apr 24 10:31:47 2010 +0200 Don't disable deprecated Gtk functions. mousepad/Makefile.am |5 - 1 files changed, 0 insertions(+), 5 deletions(-) diff --git a/mousepad/Makefile.am b/mousepad/Makefile.am index 4c46a67..15dbab1 100644 --- a/mousepad/Makefile.am +++ b/mousepad/Makefile.am @@ -8,11 +8,6 @@ INCLUDES = \ -DG_LOG_DOMAIN=\Mousepad\ \ -DLIBEXECDIR=\$(libexecdir)\ \ -DPACKAGE_LOCALE_DIR=\$(localedir)\ \ - -DG_DISABLE_DEPRECATED \ - -DGTK_DISABLE_DEPRECATED \ - -DGDK_DISABLE_DEPRECATED \ - -DG_DISABLE_SINGLE_INCLUDES \ - -DPANGO_DISABLE_SINGLE_INCLUDES \ -DGDK_PIXBUF_DISABLE_SINGLE_INCLUDES \ -DGTK_DISABLE_SINGLE_INCLUDES \ $(PLATFORM_CPPFLAGS) ___ Xfce4-commits mailing list Xfce4-commits@xfce.org https://mail.xfce.org/mailman/listinfo/xfce4-commits
[Xfce4-commits] mousepad:master Make build GIT friendly.
Updating branch refs/heads/master to 3eea02f5adfabad3bbd9975eb6f69fea1c213a1b (commit) from 1972a36499a3644bc32067bb748a79f0d4523257 (commit) commit 3eea02f5adfabad3bbd9975eb6f69fea1c213a1b Author: Nick Schermer n...@xfce.org Date: Sat Apr 24 10:35:51 2010 +0200 Make build GIT friendly. Also apply silent rules and use new XDT macros. ChangeLog| 779 -- Makefile.am |9 + autogen.sh | 18 +-- configure.in.in | 93 +-- mousepad/Makefile.am |8 +- 5 files changed, 25 insertions(+), 882 deletions(-) diff --git a/ChangeLog b/ChangeLog deleted file mode 100644 index 244a1da..000 --- a/ChangeLog +++ /dev/null @@ -1,779 +0,0 @@ -2008-03-xx Nick Schermer n...@xfce.org - - * mousepad/mousepad-file.c: Use GMappedFile (mmap) for opening a - document. Also improve the line ending detection and avoid - a lot of gtk_text_buffer_insert() calls when opening unix or - mac line-ended files. - * Some internal renaming. - - -2008-03-10 Nick Schermer n...@xfce.org - - * mousepad/mousepad-document.c: Swap the colors of readonly and - modified tabs. Red is modified and green readonly. - - -2008-03-02 Nick Schermer n...@xfce.org - - * mousepad/mousepad-file.c: Don't set an error and return false on - externally modified when the file does not exist. This fixes - an error when saving a new file. - * mousepad/mousepad-file.c: Emit signal when the readonly status - changes. - * mousepad/mousepad-document.c: Use the readonly signal to update - the label color. This fixes a readonly-colored label when saving - a new file. - - -2008-02-17 Nick Schermer n...@xfce.org - - * mousepad/mousepad-search-bar.c: Select the text in the search - entry when focussing the search bar (Ctrl+F). - * mousepad/mousepad-window.c: Set default keybindings of Find Next - and Find Previous to F3 and Shft+F3. - - -2008-01-15 Nick Schermer n...@xfce.org - - * configure.in.in, mousepad/Makefile.am: Remove gmodule from the - library list, is not used. Add glib to make sure it's linked. - * mousepad/mousepad-window.c: Use the HOME environment variable - to search for the templates path, fallback on g_get_homedir. - * MousepadHelp.in: Improve script to find other browsers too, - instead of only using exo-open. - * mousepad/mousepad-preferences: Improve the performace of loading - and saving a bit. Loading now directly writes to the internal - value array. Could be a bit tricky, we'll see. - * mousepad/mousepad-{preferences,print}.c: Use g_key_file_{get, - set}_value instead of g_key_file_{get,set}_string, should be a - bit faster. - * mousepad/mousepad-window.c: Be more secure when loading tab sizes. - * po/mousepad.pot: Update. - - -2008-01-15 Nick Schermer n...@xfce.org - - * mousepad/mousepad-window.c: Update menu actions after a document - is closed, so the detach action becomes insensitive when there - is only one document openened. - - -2008-01-15 Nick Schermer n...@xfce.org - - * TODO: Update - * mousepad/mousepad-{dialogs,window,file}.c: Check for external - file modifications before saving. - * ChangeLog: Update. - * configure.in.in: Remove api version and add support for a nano - version. - - -2008-01-14 Nick Schermer n...@xfce.org - - * configure.in.in, mousepad/mousepad-{preferences,print,window}.c, - mousepad/main.c: Drop libxfce4util as a dependency by using - GKeyFile. Binary size increased with only 1K and most likely more - people will use Mousepad when it's a Gtk+ only application. - * mousepad/mousepad-{window,dialogs}.c, Mousepad.desktop.in.in: Use - accessories-text-editor as icon name. - * icons/{16x16,24x24,scalable}/Makefile.am: Install symlinks from - Mousepad.{png,svg} to ccessories-text-editor.{png,svg}. - - -2008-01-14 Nick Schermer n...@xfce.org - - * mousepad/mousepad-*.c: Use G_DEFINE_TYPE for initializing objects. - * mousepad/mousepad-*.c: Properly set the emission stage for - all signals. - * mousepad/mousepad-*: Cleanup some unneeded code. - * mousepad/mousepad-window.c: Fix assert when dropping a file in - the editor window. - * mousepad/mousepad-window.c: Fix 2 small typos in the menu tooltips. - - -2007-12-12 Nick Schermer n...@xfce.org - - * mousepad/mousepad-window.c: Try to find the file encoding in the - recent history, when opening a document that didn't pass the - UTF-8 check. - - -2007-12-10 Nick Schermer n...@xfce.org - - * mousepad/mousepad-undo.c: Remove testing messages. - - -2007-12-10 Nick Schermer
[Xfce4-commits] mousepad:master Drop old po files.
Updating branch refs/heads/master to acfa674ea1984c5a449cf8e23ae53e4409edda5a (commit) from 3eea02f5adfabad3bbd9975eb6f69fea1c213a1b (commit) commit acfa674ea1984c5a449cf8e23ae53e4409edda5a Author: Nick Schermer n...@xfce.org Date: Sat Apr 24 10:40:26 2010 +0200 Drop old po files. po/LINGUAS |1 - po/TRANSLATORS |4 - po/mousepad.pot | 902 --- 3 files changed, 0 insertions(+), 907 deletions(-) diff --git a/po/ChangeLog b/po/ChangeLog deleted file mode 100644 index e69de29..000 diff --git a/po/LINGUAS b/po/LINGUAS deleted file mode 100644 index a0f7499..000 --- a/po/LINGUAS +++ /dev/null @@ -1 +0,0 @@ -# set of available languages (in alphabetic order) diff --git a/po/TRANSLATORS b/po/TRANSLATORS deleted file mode 100644 index b0ccff4..000 --- a/po/TRANSLATORS +++ /dev/null @@ -1,4 +0,0 @@ -Note to translators: -~~~ -Don't translate this branch until it gets moved to trunk. Thanks. - diff --git a/po/mousepad.pot b/po/mousepad.pot deleted file mode 100644 index bd2931b..000 --- a/po/mousepad.pot +++ /dev/null @@ -1,902 +0,0 @@ -# SOME DESCRIPTIVE TITLE. -# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER -# This file is distributed under the same license as the PACKAGE package. -# FIRST AUTHOR EMAIL@ADDRESS, YEAR. -# -#, fuzzy -msgid -msgstr -Project-Id-Version: PACKAGE VERSION\n -Report-Msgid-Bugs-To: \n -POT-Creation-Date: 2008-01-15 12:38+0100\n -PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n -Last-Translator: FULL NAME EMAIL@ADDRESS\n -Language-Team: LANGUAGE l...@li.org\n -MIME-Version: 1.0\n -Content-Type: text/plain; charset=CHARSET\n -Content-Transfer-Encoding: 8bit\n -Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\n - -#: ../mousepad/main.c:54 -msgid Do not register with the D-BUS session message bus -msgstr - -#: ../mousepad/main.c:55 -msgid Quit a running Mousepad instance -msgstr - -#: ../mousepad/main.c:57 -msgid Print version information and exit -msgstr - -#. default application name -#: ../mousepad/main.c:81 ../Mousepad.desktop.in.in.h:1 -msgid Mousepad -msgstr - -#. initialize gtk+ -#: ../mousepad/main.c:93 -msgid [FILES...] -msgstr - -#. no error message, the gui initialization failed -#: ../mousepad/main.c:99 -msgid Failed to open display. -msgstr - -#: ../mousepad/main.c:116 -msgid The Xfce development team. All rights reserved. -msgstr - -#: ../mousepad/main.c:117 -#, c-format -msgid Please report bugs to %s. -msgstr - -#: ../mousepad/mousepad-dialogs.c:41 -msgid Mousepad is a fast text editor for the Xfce Desktop Environment. -msgstr - -#: ../mousepad/mousepad-dialogs.c:50 -msgid translator-credits -msgstr - -#. display an error message to the user -#: ../mousepad/mousepad-dialogs.c:125 -msgid Failed to open the documentation browser -msgstr - -#. build dialog -#: ../mousepad/mousepad-dialogs.c:143 -msgid Select Tab Size -msgstr - -#. build the dialog -#: ../mousepad/mousepad-dialogs.c:224 -msgid Go To -msgstr - -#: ../mousepad/mousepad-dialogs.c:246 -msgid _Line number: -msgstr - -#: ../mousepad/mousepad-dialogs.c:265 -msgid C_olumn number: -msgstr - -#: ../mousepad/mousepad-dialogs.c:323 -msgid Remove all entries from the documents history? -msgstr - -#: ../mousepad/mousepad-dialogs.c:328 -msgid Clear Documents History -msgstr - -#: ../mousepad/mousepad-dialogs.c:331 -msgid -Clearing the documents history will permanently remove all currently listed -entries. -msgstr - -#: ../mousepad/mousepad-dialogs.c:362 -msgid Do you want to save the changes before closing? -msgstr - -#: ../mousepad/mousepad-dialogs.c:363 -msgid Save Changes -msgstr - -#: ../mousepad/mousepad-dialogs.c:364 -msgid _Don't Save -msgstr - -#. secondary text -#: ../mousepad/mousepad-dialogs.c:386 -msgid If you don't save the document, all the changes will be lost. -msgstr - -#: ../mousepad/mousepad-dialogs.c:408 -msgid -The document has been externally modified. Do you want to continue saving? -msgstr - -#: ../mousepad/mousepad-dialogs.c:409 -msgid Externally Modified -msgstr - -#: ../mousepad/mousepad-dialogs.c:410 -msgid If you don't save the document, all the external changes will be lost. -msgstr - -#: ../mousepad/mousepad-dialogs.c:438 -msgid Do you want to save your changes before reloading? -msgstr - -#: ../mousepad/mousepad-dialogs.c:440 -msgid If you revert the file, all unsaved changes will be lost. -msgstr - -#. pack button, add signal and tooltip -#: ../mousepad/mousepad-document.c:552 -msgid Close this tab -msgstr - -#. create an unique untitled document name -#: ../mousepad/mousepad-document.c:587 -msgid Untitled -msgstr - -#. create the header -#: ../mousepad/mousepad-encoding-dialog.c:208 -msgid The document was not UTF-8 valid -msgstr - -#: ../mousepad/mousepad-encoding-dialog.c:209 -msgid Please select an encoding below. -msgstr - -#. encoding radio buttons -#: ../mousepad/mousepad-encoding-dialog.c:221 -msgid Default (UTF-8) -msgstr - -#:
[Xfce4-commits] mousepad:master Rename configure.in.in to configure.ac.in.
Updating branch refs/heads/master to a269c2d3c2f009925da47191f3eb7fec459072c1 (commit) from acfa674ea1984c5a449cf8e23ae53e4409edda5a (commit) commit a269c2d3c2f009925da47191f3eb7fec459072c1 Author: Nick Schermer n...@xfce.org Date: Wed Apr 28 02:14:14 2010 +0200 Rename configure.in.in to configure.ac.in. configure.in.in = configure.ac.in |0 1 files changed, 0 insertions(+), 0 deletions(-) diff --git a/configure.in.in b/configure.ac.in similarity index 100% rename from configure.in.in rename to configure.ac.in ___ Xfce4-commits mailing list Xfce4-commits@xfce.org https://mail.xfce.org/mailman/listinfo/xfce4-commits
[Xfce4-commits] mousepad:master Drop usage of the GtkStatusbar.
Updating branch refs/heads/master to 185821ae262235222f7ef1d3a86dc0ea2b19bbd9 (commit) from 385535209b957746bec3d29818bc1d4490df35e3 (commit) commit 185821ae262235222f7ef1d3a86dc0ea2b19bbd9 Author: Nick Schermer n...@xfce.org Date: Fri Oct 15 16:19:40 2010 +0200 Drop usage of the GtkStatusbar. Only shows a lot of errors. Because of this we loose the resize grip for now, but in gtk3 this will be possible again. mousepad/mousepad-statusbar.c | 54 +++- mousepad/mousepad-statusbar.h |2 + mousepad/mousepad-window.c| 17 +--- 3 files changed, 35 insertions(+), 38 deletions(-) diff --git a/mousepad/mousepad-statusbar.c b/mousepad/mousepad-statusbar.c index 0321c3e..dc4503f 100644 --- a/mousepad/mousepad-statusbar.c +++ b/mousepad/mousepad-statusbar.c @@ -39,19 +39,20 @@ enum struct _MousepadStatusbarClass { - GtkStatusbarClass __parent__; + GtkHBoxClass __parent__; }; struct _MousepadStatusbar { - GtkStatusbar__parent__; + GtkHBox __parent__; /* whether overwrite is enabled */ - guint overwrite_enabled : 1; + guint overwrite_enabled : 1; /* extra labels in the statusbar */ - GtkWidget *position; - GtkWidget *overwrite; + GtkWidget *tooltip; + GtkWidget *position; + GtkWidget *overwrite; }; @@ -60,7 +61,7 @@ static guint statusbar_signals[LAST_SIGNAL]; -G_DEFINE_TYPE (MousepadStatusbar, mousepad_statusbar, GTK_TYPE_STATUSBAR); +G_DEFINE_TYPE (MousepadStatusbar, mousepad_statusbar, GTK_TYPE_HBOX); @@ -93,41 +94,38 @@ mousepad_statusbar_class_init (MousepadStatusbarClass *klass) static void mousepad_statusbar_init (MousepadStatusbar *statusbar) { - GtkWidget*ebox, *box, *separator; - GtkStatusbar *bar = GTK_STATUSBAR (statusbar); + GtkWidget *ebox, *separator; /* init statusbar */ - gtk_statusbar_set_has_resize_grip (bar, TRUE); + gtk_box_set_spacing (GTK_BOX (statusbar), 6); + gtk_container_set_border_width (GTK_CONTAINER (statusbar), 2); - /* create a new horizontal box */ - box = gtk_hbox_new (FALSE, 8); - gtk_widget_show (box); - - /* reorder the gtk statusbar */ - g_object_ref (G_OBJECT (bar-label)); - gtk_container_remove (GTK_CONTAINER (bar-frame), bar-label); - gtk_container_add (GTK_CONTAINER (bar-frame), box); - gtk_box_pack_start (GTK_BOX (box), bar-label, TRUE, TRUE, 0); - g_object_unref (G_OBJECT (bar-label)); + /* tooltip label */ + statusbar-tooltip = gtk_label_new (NULL); + gtk_misc_set_alignment (GTK_MISC (statusbar-tooltip), 0.0, 0.5); + gtk_box_pack_start (GTK_BOX (statusbar), statusbar-tooltip, TRUE, TRUE, 0); + gtk_label_set_ellipsize (GTK_LABEL (statusbar-tooltip), PANGO_ELLIPSIZE_END); + gtk_label_set_single_line_mode (GTK_LABEL (statusbar-tooltip), TRUE); + gtk_widget_show (statusbar-tooltip); /* separator */ separator = gtk_vseparator_new (); - gtk_box_pack_start (GTK_BOX (box), separator, FALSE, FALSE, 0); + gtk_box_pack_start (GTK_BOX (statusbar), separator, FALSE, FALSE, 0); gtk_widget_show (separator); /* line and column numbers */ statusbar-position = gtk_label_new (NULL); - gtk_box_pack_start (GTK_BOX (box), statusbar-position, FALSE, TRUE, 0); + gtk_box_pack_start (GTK_BOX (statusbar), statusbar-position, FALSE, TRUE, 0); gtk_widget_show (statusbar-position); /* separator */ separator = gtk_vseparator_new (); - gtk_box_pack_start (GTK_BOX (box), separator, FALSE, FALSE, 0); + gtk_box_pack_start (GTK_BOX (statusbar), separator, FALSE, FALSE, 0); gtk_widget_show (separator); /* overwrite event box */ ebox = gtk_event_box_new (); - gtk_box_pack_start (GTK_BOX (box), ebox, FALSE, TRUE, 0); + gtk_box_pack_start (GTK_BOX (statusbar), ebox, FALSE, TRUE, 0); gtk_event_box_set_visible_window (GTK_EVENT_BOX (ebox), FALSE); mousepad_widget_set_tooltip_text (ebox, _(Toggle the overwrite mode)); g_signal_connect (G_OBJECT (ebox), button-press-event, G_CALLBACK (mousepad_statusbar_overwrite_clicked), statusbar); @@ -195,3 +193,13 @@ mousepad_statusbar_set_overwrite (MousepadStatusbar *statusbar, statusbar-overwrite_enabled = overwrite; } + + + +void +mousepad_statusbar_set_tooltip (MousepadStatusbar *statusbar, +const gchar *tooltip) +{ + mousepad_return_if_fail (MOUSEPAD_IS_STATUSBAR (statusbar)); + gtk_label_set_text (GTK_LABEL (statusbar-tooltip), tooltip); +} diff --git a/mousepad/mousepad-statusbar.h b/mousepad/mousepad-statusbar.h index c44b54e..0a4fcf1 100644 --- a/mousepad/mousepad-statusbar.h +++ b/mousepad/mousepad-statusbar.h @@ -41,6 +41,8 @@ voidmousepad_statusbar_set_cursor_position (MousepadStatusbar *statusba voidmousepad_statusbar_set_overwrite(MousepadStatusbar *statusbar, gboolean overwrite); +voidmousepad_statusbar_set_tooltip
[Xfce4-commits] mousepad:master Fix error in recent actions.
Updating branch refs/heads/master to ff0faf3c3250b4e56598aec891109d96f3aece7a (commit) from 185821ae262235222f7ef1d3a86dc0ea2b19bbd9 (commit) commit ff0faf3c3250b4e56598aec891109d96f3aece7a Author: Nick Schermer n...@xfce.org Date: Fri Oct 15 16:24:59 2010 +0200 Fix error in recent actions. mousepad/mousepad-window.c |7 --- 1 files changed, 4 insertions(+), 3 deletions(-) diff --git a/mousepad/mousepad-window.c b/mousepad/mousepad-window.c index deb9696..a434867 100644 --- a/mousepad/mousepad-window.c +++ b/mousepad/mousepad-window.c @@ -2380,7 +2380,7 @@ mousepad_window_recent_menu_idle (gpointer user_data) g_object_get (G_OBJECT (window-preferences), misc-recent-menu-items, n, NULL); /* append the items to the menu */ - for (li = filtered; n 0 li != NULL; li = li-next) + for (li = filtered, i = 1; n 0 li != NULL; li = li-next) { info = li-data; @@ -2392,7 +2392,7 @@ mousepad_window_recent_menu_idle (gpointer user_data) if (filename g_file_test (filename, G_FILE_TEST_EXISTS)) { /* create the action name */ - g_snprintf (name, sizeof (name), recent-info-%d, n); + g_snprintf (name, sizeof (name), recent-info-%d, i); /* get the name of the item and escape the underscores */ display_name = gtk_recent_info_get_display_name (info); @@ -2425,8 +2425,9 @@ mousepad_window_recent_menu_idle (gpointer user_data) /main-menu/file-menu/recent-menu/placeholder-recent-items, name, name, GTK_UI_MANAGER_MENUITEM, FALSE); - /* decrease counter */ + /* update couters */ n--; + i++; } else { ___ Xfce4-commits mailing list Xfce4-commits@xfce.org https://mail.xfce.org/mailman/listinfo/xfce4-commits
[Xfce4-commits] mousepad:master Revert Drop usage of the GtkStatusbar.
Updating branch refs/heads/master to 6bdfbdf87e4ac5ffd528b6daafd9755acfe04415 (commit) from ff0faf3c3250b4e56598aec891109d96f3aece7a (commit) commit 6bdfbdf87e4ac5ffd528b6daafd9755acfe04415 Author: Matthew Brush mbr...@codebrainz.ca Date: Mon Oct 3 03:56:58 2011 -0700 Revert Drop usage of the GtkStatusbar. This reverts commit 185821ae262235222f7ef1d3a86dc0ea2b19bbd9. mousepad/mousepad-statusbar.c | 54 +--- mousepad/mousepad-statusbar.h |2 - mousepad/mousepad-window.c| 17 +++- 3 files changed, 38 insertions(+), 35 deletions(-) diff --git a/mousepad/mousepad-statusbar.c b/mousepad/mousepad-statusbar.c index dc4503f..0321c3e 100644 --- a/mousepad/mousepad-statusbar.c +++ b/mousepad/mousepad-statusbar.c @@ -39,20 +39,19 @@ enum struct _MousepadStatusbarClass { - GtkHBoxClass __parent__; + GtkStatusbarClass __parent__; }; struct _MousepadStatusbar { - GtkHBox __parent__; + GtkStatusbar__parent__; /* whether overwrite is enabled */ - guint overwrite_enabled : 1; + guint overwrite_enabled : 1; /* extra labels in the statusbar */ - GtkWidget *tooltip; - GtkWidget *position; - GtkWidget *overwrite; + GtkWidget *position; + GtkWidget *overwrite; }; @@ -61,7 +60,7 @@ static guint statusbar_signals[LAST_SIGNAL]; -G_DEFINE_TYPE (MousepadStatusbar, mousepad_statusbar, GTK_TYPE_HBOX); +G_DEFINE_TYPE (MousepadStatusbar, mousepad_statusbar, GTK_TYPE_STATUSBAR); @@ -94,38 +93,41 @@ mousepad_statusbar_class_init (MousepadStatusbarClass *klass) static void mousepad_statusbar_init (MousepadStatusbar *statusbar) { - GtkWidget *ebox, *separator; + GtkWidget*ebox, *box, *separator; + GtkStatusbar *bar = GTK_STATUSBAR (statusbar); /* init statusbar */ - gtk_box_set_spacing (GTK_BOX (statusbar), 6); - gtk_container_set_border_width (GTK_CONTAINER (statusbar), 2); + gtk_statusbar_set_has_resize_grip (bar, TRUE); - /* tooltip label */ - statusbar-tooltip = gtk_label_new (NULL); - gtk_misc_set_alignment (GTK_MISC (statusbar-tooltip), 0.0, 0.5); - gtk_box_pack_start (GTK_BOX (statusbar), statusbar-tooltip, TRUE, TRUE, 0); - gtk_label_set_ellipsize (GTK_LABEL (statusbar-tooltip), PANGO_ELLIPSIZE_END); - gtk_label_set_single_line_mode (GTK_LABEL (statusbar-tooltip), TRUE); - gtk_widget_show (statusbar-tooltip); + /* create a new horizontal box */ + box = gtk_hbox_new (FALSE, 8); + gtk_widget_show (box); + + /* reorder the gtk statusbar */ + g_object_ref (G_OBJECT (bar-label)); + gtk_container_remove (GTK_CONTAINER (bar-frame), bar-label); + gtk_container_add (GTK_CONTAINER (bar-frame), box); + gtk_box_pack_start (GTK_BOX (box), bar-label, TRUE, TRUE, 0); + g_object_unref (G_OBJECT (bar-label)); /* separator */ separator = gtk_vseparator_new (); - gtk_box_pack_start (GTK_BOX (statusbar), separator, FALSE, FALSE, 0); + gtk_box_pack_start (GTK_BOX (box), separator, FALSE, FALSE, 0); gtk_widget_show (separator); /* line and column numbers */ statusbar-position = gtk_label_new (NULL); - gtk_box_pack_start (GTK_BOX (statusbar), statusbar-position, FALSE, TRUE, 0); + gtk_box_pack_start (GTK_BOX (box), statusbar-position, FALSE, TRUE, 0); gtk_widget_show (statusbar-position); /* separator */ separator = gtk_vseparator_new (); - gtk_box_pack_start (GTK_BOX (statusbar), separator, FALSE, FALSE, 0); + gtk_box_pack_start (GTK_BOX (box), separator, FALSE, FALSE, 0); gtk_widget_show (separator); /* overwrite event box */ ebox = gtk_event_box_new (); - gtk_box_pack_start (GTK_BOX (statusbar), ebox, FALSE, TRUE, 0); + gtk_box_pack_start (GTK_BOX (box), ebox, FALSE, TRUE, 0); gtk_event_box_set_visible_window (GTK_EVENT_BOX (ebox), FALSE); mousepad_widget_set_tooltip_text (ebox, _(Toggle the overwrite mode)); g_signal_connect (G_OBJECT (ebox), button-press-event, G_CALLBACK (mousepad_statusbar_overwrite_clicked), statusbar); @@ -193,13 +195,3 @@ mousepad_statusbar_set_overwrite (MousepadStatusbar *statusbar, statusbar-overwrite_enabled = overwrite; } - - - -void -mousepad_statusbar_set_tooltip (MousepadStatusbar *statusbar, -const gchar *tooltip) -{ - mousepad_return_if_fail (MOUSEPAD_IS_STATUSBAR (statusbar)); - gtk_label_set_text (GTK_LABEL (statusbar-tooltip), tooltip); -} diff --git a/mousepad/mousepad-statusbar.h b/mousepad/mousepad-statusbar.h index 0a4fcf1..c44b54e 100644 --- a/mousepad/mousepad-statusbar.h +++ b/mousepad/mousepad-statusbar.h @@ -41,8 +41,6 @@ voidmousepad_statusbar_set_cursor_position (MousepadStatusbar *statusba voidmousepad_statusbar_set_overwrite(MousepadStatusbar *statusbar, gboolean overwrite); -voidmousepad_statusbar_set_tooltip (MousepadStatusbar *statusbar, -
[Xfce4-commits] mousepad:master Prevent warnings when messing around with statusbar internal widgets.
Updating branch refs/heads/master to b401a34b8c6b88ebd26e26f03a70a13548cbc4c0 (commit) from 6bdfbdf87e4ac5ffd528b6daafd9755acfe04415 (commit) commit b401a34b8c6b88ebd26e26f03a70a13548cbc4c0 Author: Matthew Brush mbr...@codebrainz.ca Date: Mon Oct 3 05:20:18 2011 -0700 Prevent warnings when messing around with statusbar internal widgets. Remove statusbar frame border. mousepad/mousepad-statusbar.c | 17 +++-- 1 files changed, 11 insertions(+), 6 deletions(-) diff --git a/mousepad/mousepad-statusbar.c b/mousepad/mousepad-statusbar.c index 0321c3e..9ed0d94 100644 --- a/mousepad/mousepad-statusbar.c +++ b/mousepad/mousepad-statusbar.c @@ -93,8 +93,9 @@ mousepad_statusbar_class_init (MousepadStatusbarClass *klass) static void mousepad_statusbar_init (MousepadStatusbar *statusbar) { - GtkWidget*ebox, *box, *separator; + GtkWidget*ebox, *box, *separator, *label; GtkStatusbar *bar = GTK_STATUSBAR (statusbar); + GList *frame; /* init statusbar */ gtk_statusbar_set_has_resize_grip (bar, TRUE); @@ -104,11 +105,15 @@ mousepad_statusbar_init (MousepadStatusbar *statusbar) gtk_widget_show (box); /* reorder the gtk statusbar */ - g_object_ref (G_OBJECT (bar-label)); - gtk_container_remove (GTK_CONTAINER (bar-frame), bar-label); - gtk_container_add (GTK_CONTAINER (bar-frame), box); - gtk_box_pack_start (GTK_BOX (box), bar-label, TRUE, TRUE, 0); - g_object_unref (G_OBJECT (bar-label)); + frame = gtk_container_get_children (GTK_CONTAINER (bar)); + gtk_frame_set_shadow_type (GTK_FRAME (frame-data), GTK_SHADOW_NONE); + label = gtk_bin_get_child (GTK_BIN (frame-data)); + g_object_ref (label); + gtk_container_remove (GTK_CONTAINER (frame-data), label); + gtk_container_add (GTK_CONTAINER (frame-data), box); + gtk_box_pack_start (GTK_BOX (box), label, TRUE, TRUE, 0); + g_object_unref (label); + g_list_free (frame); /* separator */ separator = gtk_vseparator_new (); ___ Xfce4-commits mailing list Xfce4-commits@xfce.org https://mail.xfce.org/mailman/listinfo/xfce4-commits
[Xfce4-commits] mousepad:master Add GtkSourceView dependency to build system.
Updating branch refs/heads/master to 4e5c46f563dc7e468041a62f82cab8e8bfc4a3dc (commit) from b401a34b8c6b88ebd26e26f03a70a13548cbc4c0 (commit) commit 4e5c46f563dc7e468041a62f82cab8e8bfc4a3dc Author: Matthew Brush mbr...@codebrainz.ca Date: Mon Oct 3 05:30:31 2011 -0700 Add GtkSourceView dependency to build system. Still need to determine which version of GtkSourceView to depend on. configure.ac.in |1 + mousepad/Makefile.am |4 +++- 2 files changed, 4 insertions(+), 1 deletions(-) diff --git a/configure.ac.in b/configure.ac.in index c4b7da2..9c820c6 100644 --- a/configure.ac.in +++ b/configure.ac.in @@ -83,6 +83,7 @@ dnl *** XDT_CHECK_PACKAGE([GLIB], [glib-2.0], [2.12.0]) XDT_CHECK_PACKAGE([GTHREAD], [gthread-2.0], [2.12.0]) XDT_CHECK_PACKAGE([GTK], [gtk+-2.0], [2.10.0]) +XDT_CHECK_PACKAGE([GTKSOURCEVIEW], [gtksourceview-2.0]) dnl ** dnl *** Optional support for D-BUS *** diff --git a/mousepad/Makefile.am b/mousepad/Makefile.am index a065629..41b7b1e 100644 --- a/mousepad/Makefile.am +++ b/mousepad/Makefile.am @@ -58,6 +58,7 @@ mousepad_CFLAGS = \ $(GLIB_CFLAGS) \ $(GTK_CFLAGS) \ $(GTHREAD_CFLAGS) \ + $(GTKSOURCEVIEW_CFLAGS) \ $(PLATFORM_CFLAGS) mousepad_LDFLAGS = \ @@ -67,7 +68,8 @@ mousepad_LDFLAGS = \ mousepad_LDADD = \ $(GLIB_LIBS) \ $(GTK_LIBS) \ - $(GTHREAD_LIBS) + $(GTHREAD_LIBS) \ + $(GTKSOURCEVIEW_LIBS) if HAVE_DBUS mousepad_built_sources += \ ___ Xfce4-commits mailing list Xfce4-commits@xfce.org https://mail.xfce.org/mailman/listinfo/xfce4-commits
[Xfce4-commits] mousepad:master Make MousepadView a subclass of GtkSourceView instead of GtkTextView.
Updating branch refs/heads/master to d1970d6b3ec4e212f8fd2823b6f5dd00c17fe4cf (commit) from 4e5c46f563dc7e468041a62f82cab8e8bfc4a3dc (commit) commit d1970d6b3ec4e212f8fd2823b6f5dd00c17fe4cf Author: Matthew Brush mbr...@codebrainz.ca Date: Mon Oct 3 01:34:42 2011 -0700 Make MousepadView a subclass of GtkSourceView instead of GtkTextView. Add include for gtksourceview.h in mousepad-private.h. Causes the line numbers to always be shown initially but this should be fixed once the line numbers code is ported to use GtkSourceView. mousepad/mousepad-private.h |1 + mousepad/mousepad-view.c|6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/mousepad/mousepad-private.h b/mousepad/mousepad-private.h index 4be50b1..520a9f7 100644 --- a/mousepad/mousepad-private.h +++ b/mousepad/mousepad-private.h @@ -21,6 +21,7 @@ #include glib-object.h #include gtk/gtk.h #include glib/gi18n.h +#include gtksourceview/gtksourceview.h G_BEGIN_DECLS diff --git a/mousepad/mousepad-view.c b/mousepad/mousepad-view.c index 4e12fa6..5146811 100644 --- a/mousepad/mousepad-view.c +++ b/mousepad/mousepad-view.c @@ -91,12 +91,12 @@ static void mousepad_view_transpose_words (GtkTextBuffer struct _MousepadViewClass { - GtkTextViewClass __parent__; + GtkSourceViewClass __parent__; }; struct _MousepadView { - GtkTextView __parent__; + GtkSourceView __parent__; /* the selection style tag */ GtkTextTag *selection_tag; @@ -128,7 +128,7 @@ struct _MousepadView -G_DEFINE_TYPE (MousepadView, mousepad_view, GTK_TYPE_TEXT_VIEW); +G_DEFINE_TYPE (MousepadView, mousepad_view, GTK_TYPE_SOURCE_VIEW); ___ Xfce4-commits mailing list Xfce4-commits@xfce.org https://mail.xfce.org/mailman/listinfo/xfce4-commits
[Xfce4-commits] mousepad:master Remove old line number code and use GtkSourceView's show-line-numbers.
Updating branch refs/heads/master to 801eadc860c894420a1807e5a9f496895bd031c8 (commit) from d1970d6b3ec4e212f8fd2823b6f5dd00c17fe4cf (commit) commit 801eadc860c894420a1807e5a9f496895bd031c8 Author: Matthew Brush mbr...@codebrainz.ca Date: Mon Oct 3 01:52:27 2011 -0700 Remove old line number code and use GtkSourceView's show-line-numbers. mousepad/mousepad-view.c | 110 + 1 files changed, 3 insertions(+), 107 deletions(-) diff --git a/mousepad/mousepad-view.c b/mousepad/mousepad-view.c index 5146811..a16c594 100644 --- a/mousepad/mousepad-view.c +++ b/mousepad/mousepad-view.c @@ -30,8 +30,6 @@ -#define LINE_NUMBER_MARGIN (10) -#define LINE_NUMBER_OFFSET (4) #define mousepad_view_get_buffer(view) (GTK_TEXT_VIEW (view)-buffer) @@ -121,7 +119,6 @@ struct _MousepadView /* settings */ guint auto_indent : 1; - guint line_numbers : 1; guint insert_spaces : 1; guint tab_size; }; @@ -156,7 +153,6 @@ mousepad_view_init (MousepadView *view) { /* initialize settings */ view-auto_indent = FALSE; - view-line_numbers = FALSE; view-insert_spaces = FALSE; view-tab_size = 8; @@ -201,13 +197,6 @@ mousepad_view_expose (GtkWidget *widget, { GtkTextView *textview = GTK_TEXT_VIEW (widget); MousepadView *view = MOUSEPAD_VIEW (widget); - gint y_start, y_offset, y_finish; - gint y_iter, height; - gint line_number, line_count; - GtkTextIter iter; - gint width, border_width; - PangoLayout *layout; - gchar str[8]; /* maximum of 10e6 lines */ if (G_UNLIKELY (view-selection_length == -1 (view-selection_marks != NULL || view-selection_end_x != -1) @@ -216,90 +205,6 @@ mousepad_view_expose (GtkWidget *widget, /* redraw the cursor lines for the vertical selection */ mousepad_view_selection_draw (view, FALSE); } - else if (event-window == gtk_text_view_get_window (textview, GTK_TEXT_WINDOW_LEFT)) -{ - /* get the real start position */ - gtk_text_view_window_to_buffer_coords (textview, GTK_TEXT_WINDOW_LEFT, - 0, event-area.y, NULL, y_start); - - /* get the left window y offset (this is *NOT* the textview offset!) */ - y_offset = event-area.y - y_start; - - /* get the bottom position */ - y_finish = y_start + event-area.height; - - /* get the start iter and its line number */ - gtk_text_view_get_line_at_y (textview, iter, y_start, NULL); - line_number = gtk_text_iter_get_line (iter); - - /* get the number of lines in the buffer */ - line_count = gtk_text_buffer_get_line_count (textview-buffer); - - /* string with the 'last' line number */ - g_snprintf (str, sizeof (str), %d, MAX (99, line_count)); - - /* create the pango layout */ - layout = gtk_widget_create_pango_layout (widget, str); - pango_layout_get_pixel_size (layout, width, NULL); - - /* border width */ - border_width = width + LINE_NUMBER_MARGIN; - - /* check if we need to set the border size again */ - if (G_UNLIKELY (gtk_text_view_get_border_window_size (textview, GTK_TEXT_WINDOW_LEFT) != border_width)) -{ - /* set the new border size */ - gtk_text_view_set_border_window_size (textview, GTK_TEXT_WINDOW_LEFT, border_width); - - /* leave, we'll redraw on the next expose event */ - goto bail_out; -} - - /* finish the pango layout */ - pango_layout_set_width (layout, width); - pango_layout_set_alignment (layout, PANGO_ALIGN_RIGHT); - - /* draw a vertical line to separate the numbers and text */ - gtk_paint_vline (widget-style, event-window, - GTK_WIDGET_STATE (widget), - NULL, widget, NULL, - event-area.y, - event-area.y + event-area.height, - border_width - 2); - - /* walk through the lines until we hit the last line */ - for (; line_number line_count; line_number++) -{ - /* get the y position and the height of the iter */ - gtk_text_view_get_line_yrange (textview, iter, y_iter, height); - - /* create the number */ - g_snprintf (str, sizeof (str), %d, line_number + 1); - - /* create the pange layout */ - pango_layout_set_text (layout, str, -1); - - /* draw the layout on the left window */ - gtk_paint_layout (widget-style, event-window, -GTK_WIDGET_STATE (widget), -FALSE, NULL, widget, NULL, -width + LINE_NUMBER_OFFSET, -y_iter + y_offset, layout); - - /* stop when we reached the end of the expose area */ - if (y_iter + height = y_finish) -
[Xfce4-commits] mousepad:master Remove old auto-indentation code and use GtkSourceView's auto-indent.
Updating branch refs/heads/master to 898612c83495635ef657fea60f6b9048640b0f15 (commit) from 801eadc860c894420a1807e5a9f496895bd031c8 (commit) commit 898612c83495635ef657fea60f6b9048640b0f15 Author: Matthew Brush mbr...@codebrainz.ca Date: Mon Oct 3 02:01:16 2011 -0700 Remove old auto-indentation code and use GtkSourceView's auto-indent. mousepad/mousepad-view.c | 78 + 1 files changed, 2 insertions(+), 76 deletions(-) diff --git a/mousepad/mousepad-view.c b/mousepad/mousepad-view.c index a16c594..8b600e4 100644 --- a/mousepad/mousepad-view.c +++ b/mousepad/mousepad-view.c @@ -69,8 +69,6 @@ static void mousepad_view_indent_decrease (MousepadView static void mousepad_view_indent_selection (MousepadView *view, gboolean increase, gboolean force); -static gchar*mousepad_view_indent_string (GtkTextBuffer *buffer, - const GtkTextIter *iter); static gint mousepad_view_calculate_layout_width(GtkWidget *widget, gsize length, gchar fill_char); @@ -118,7 +116,6 @@ struct _MousepadView guint selection_editing : 1; /* settings */ - guint auto_indent : 1; guint insert_spaces : 1; guint tab_size; }; @@ -152,7 +149,6 @@ static void mousepad_view_init (MousepadView *view) { /* initialize settings */ - view-auto_indent = FALSE; view-insert_spaces = FALSE; view-tab_size = 8; @@ -266,7 +262,6 @@ mousepad_view_key_press_event (GtkWidget *widget, GtkTextIteriter; GtkTextMark *cursor; guint modifiers; - gchar *string; gboolean im_handled; gboolean is_editable; @@ -282,48 +277,6 @@ mousepad_view_key_press_event (GtkWidget *widget, /* handle the key event */ switch (event-keyval) { - case GDK_Return: - case GDK_KP_Enter: -if (!(event-state GDK_SHIFT_MASK) view-auto_indent is_editable) - { -/* get the iter position of the cursor */ -cursor = gtk_text_buffer_get_insert (buffer); -gtk_text_buffer_get_iter_at_mark (buffer, iter, cursor); - -/* get the string of tabs and spaces we're going to indent */ -string = mousepad_view_indent_string (buffer, iter); - -if (string != NULL) - { -/* check if the input method emitted this event */ -im_handled = gtk_im_context_filter_keypress (GTK_TEXT_VIEW (view)-im_context, event); - -/* check if we're allowed to handle this event */ -if (G_LIKELY (im_handled == FALSE)) - { -/* begin a user action */ -gtk_text_buffer_begin_user_action (buffer); - -/* insert the indent characters */ -gtk_text_buffer_insert (buffer, iter, \n, 1); -gtk_text_buffer_insert (buffer, iter, string, -1); - -/* end user action */ -gtk_text_buffer_end_user_action (buffer); - -/* make sure the new string is visible for the user */ -mousepad_view_scroll_to_cursor (view); - } - -/* cleanup */ -g_free (string); - -/* return */ -return (im_handled == FALSE); - } - } -break; - case GDK_End: case GDK_KP_End: if (modifiers GDK_CONTROL_MASK) @@ -1208,32 +1161,6 @@ mousepad_view_indent_selection (MousepadView *view, -static gchar * -mousepad_view_indent_string (GtkTextBuffer *buffer, - const GtkTextIter *iter) -{ - GtkTextIter start, end; - gintline; - - /* get the line of the iter */ - line = gtk_text_iter_get_line (iter); - - /* get the iter of the beginning of this line */ - gtk_text_buffer_get_iter_at_line (buffer, start, line); - - /* set the end iter */ - end = start; - - /* forward until we hit text */ - if (mousepad_util_forward_iter_to_text (end, iter) == FALSE) -return NULL; - - /* return the text between the iters */ - return gtk_text_iter_get_slice (start, end); -} - - - static gint mousepad_view_calculate_layout_width (GtkWidget *widget, gsize length, @@ -2454,8 +2381,7 @@ mousepad_view_set_auto_indent (MousepadView *view, { mousepad_return_if_fail (MOUSEPAD_IS_VIEW (view)); - /* set the boolean */ - view-auto_indent =
[Xfce4-commits] mousepad:master Remove old insert spaces code and use GtkSourceView's.
Updating branch refs/heads/master to 6be5f6c5f9de3242f234f08506da31e55396d9b5 (commit) from 898612c83495635ef657fea60f6b9048640b0f15 (commit) commit 6be5f6c5f9de3242f234f08506da31e55396d9b5 Author: Matthew Brush mbr...@codebrainz.ca Date: Mon Oct 3 02:38:25 2011 -0700 Remove old insert spaces code and use GtkSourceView's. Remove special tab handling since GtkSourceView handles it. mousepad/mousepad-view.c | 48 ++--- 1 files changed, 3 insertions(+), 45 deletions(-) diff --git a/mousepad/mousepad-view.c b/mousepad/mousepad-view.c index 8b600e4..438b671 100644 --- a/mousepad/mousepad-view.c +++ b/mousepad/mousepad-view.c @@ -116,7 +116,6 @@ struct _MousepadView guint selection_editing : 1; /* settings */ - guint insert_spaces : 1; guint tab_size; }; @@ -149,7 +148,6 @@ static void mousepad_view_init (MousepadView *view) { /* initialize settings */ - view-insert_spaces = FALSE; view-tab_size = 8; /* initialize selection variables */ @@ -352,45 +350,6 @@ mousepad_view_key_press_event (GtkWidget *widget, } break; - case GDK_Tab: - case GDK_KP_Tab: - case GDK_ISO_Left_Tab: -if (G_LIKELY (is_editable)) - { -if (view-selection_marks != NULL) - { -/* insert a tab in the selection */ -mousepad_view_selection_key_press_event (view, NULL, GDK_Tab, modifiers); - -return TRUE; - } -else if (gtk_text_buffer_get_selection_bounds (buffer, NULL, NULL)) - { -/* indent the selection */ -mousepad_view_indent_selection (view, !(modifiers GDK_SHIFT_MASK), FALSE); - -return TRUE; - } -else if (view-insert_spaces) - { -/* get the iter position of the cursor */ -cursor = gtk_text_buffer_get_insert (buffer); -gtk_text_buffer_get_iter_at_mark (buffer, iter, cursor); - -/* begin user action */ -gtk_text_buffer_begin_user_action (buffer); - -/* insert spaces */ -mousepad_view_indent_increase (view, iter); - -/* end user action */ -gtk_text_buffer_end_user_action (buffer); - -return TRUE; - } - } -break; - default: if (G_UNLIKELY (view-selection_marks != NULL is_editable)) { @@ -1034,7 +993,7 @@ mousepad_view_indent_increase (MousepadView *view, /* get the buffer */ buffer = mousepad_view_get_buffer (view); - if (view-insert_spaces) + if (gtk_source_view_get_insert_spaces_instead_of_tabs (GTK_SOURCE_VIEW (view))) { /* get the offset */ offset = mousepad_util_get_real_line_offset (iter, view-tab_size); @@ -2424,8 +2383,7 @@ mousepad_view_set_insert_spaces (MousepadView *view, { mousepad_return_if_fail (MOUSEPAD_IS_VIEW (view)); - /* set boolean */ - view-insert_spaces = insert_spaces; + gtk_source_view_set_insert_spaces_instead_of_tabs (GTK_SOURCE_VIEW (view), insert_spaces); } @@ -2504,5 +2462,5 @@ mousepad_view_get_insert_spaces (MousepadView *view) { mousepad_return_val_if_fail (MOUSEPAD_IS_VIEW (view), FALSE); - return view-insert_spaces; + return gtk_source_view_get_insert_spaces_instead_of_tabs (GTK_SOURCE_VIEW (view)); } ___ Xfce4-commits mailing list Xfce4-commits@xfce.org https://mail.xfce.org/mailman/listinfo/xfce4-commits
[Xfce4-commits] mousepad:master Remove old tab size code and use GtkSourceView's tab-width.
Updating branch refs/heads/master to 9a6ad0cb703ec1ef475458cec656cbeef9d865dc (commit) from 728cb754e087cf0bbc2efa7167a8008b2c66752a (commit) commit 9a6ad0cb703ec1ef475458cec656cbeef9d865dc Author: Matthew Brush mbr...@codebrainz.ca Date: Mon Oct 3 08:10:59 2011 -0700 Remove old tab size code and use GtkSourceView's tab-width. mousepad/mousepad-view.c | 92 +++--- 1 files changed, 14 insertions(+), 78 deletions(-) diff --git a/mousepad/mousepad-view.c b/mousepad/mousepad-view.c index 438b671..6c98b15 100644 --- a/mousepad/mousepad-view.c +++ b/mousepad/mousepad-view.c @@ -69,9 +69,6 @@ static void mousepad_view_indent_decrease (MousepadView static void mousepad_view_indent_selection (MousepadView *view, gboolean increase, gboolean force); -static gint mousepad_view_calculate_layout_width(GtkWidget *widget, - gsize length, - gchar fill_char); static void mousepad_view_transpose_multi_selection (GtkTextBuffer *buffer, MousepadView *view); static void mousepad_view_transpose_range (GtkTextBuffer *buffer, @@ -114,9 +111,6 @@ struct _MousepadView /* if the selection is in editing mode */ guint selection_editing : 1; - - /* settings */ - guint tab_size; }; @@ -147,9 +141,6 @@ mousepad_view_class_init (MousepadViewClass *klass) static void mousepad_view_init (MousepadView *view) { - /* initialize settings */ - view-tab_size = 8; - /* initialize selection variables */ view-selection_timeout_id = 0; view-selection_tag = NULL; @@ -240,9 +231,6 @@ mousepad_view_style_set (GtkWidget *widget, foreground-gdk, style-text[GTK_STATE_SELECTED], NULL); - /* update the tab size */ - mousepad_view_set_tab_size (view, view-tab_size); - /* redraw selection */ if (view-selection_marks != NULL) mousepad_view_selection_draw (view, FALSE); @@ -987,24 +975,25 @@ mousepad_view_indent_increase (MousepadView *view, GtkTextIter *iter) { gchar *string; - gint offset, length, inline_len; + gint offset, length, inline_len, tab_size; GtkTextBuffer *buffer; /* get the buffer */ buffer = mousepad_view_get_buffer (view); + tab_size = gtk_source_view_get_tab_width (GTK_SOURCE_VIEW (view)); if (gtk_source_view_get_insert_spaces_instead_of_tabs (GTK_SOURCE_VIEW (view))) { /* get the offset */ - offset = mousepad_util_get_real_line_offset (iter, view-tab_size); + offset = mousepad_util_get_real_line_offset (iter, tab_size); /* calculate the length to inline with a tab */ - inline_len = offset % view-tab_size; + inline_len = offset % tab_size; if (inline_len == 0) -length = view-tab_size; +length = tab_size; else -length = view-tab_size - inline_len; +length = tab_size - inline_len; /* create spaces string */ string = g_strnfill (length, ' '); @@ -1030,11 +1019,14 @@ mousepad_view_indent_decrease (MousepadView *view, { GtkTextBuffer *buffer; GtkTextIterstart, end; - gint columns = view-tab_size; + gint columns, tab_size; gunichar c; /* set iters */ start = end = *iter; + + tab_size = gtk_source_view_get_tab_width (GTK_SOURCE_VIEW (view)); + columns = tab_size; /* walk until we've removed enough columns */ while (columns 0) @@ -1043,7 +1035,7 @@ mousepad_view_indent_decrease (MousepadView *view, c = gtk_text_iter_get_char (end); if (c == '\t') -columns -= view-tab_size; +columns -= tab_size; else if (c == ' ') columns--; else @@ -1119,42 +,6 @@ mousepad_view_indent_selection (MousepadView *view, } - -static gint -mousepad_view_calculate_layout_width (GtkWidget *widget, - gsize length, - gchar fill_char) -{ - PangoLayout *layout; - gchar *string; - gint width = -1; - - mousepad_return_val_if_fail (GTK_IS_WIDGET (widget), -1); - mousepad_return_val_if_fail (length 0, -1); - - /* create character string */ - string = g_strnfill (length, fill_char); - - /* create pango layout from widget */ - layout = gtk_widget_create_pango_layout (widget, string); - - /* cleanup */ - g_free (string); -
[Xfce4-commits] mousepad:master Remove undo manager code and use GtkSourceView's undo manager.
Updating branch refs/heads/master to 728cb754e087cf0bbc2efa7167a8008b2c66752a (commit) from 6be5f6c5f9de3242f234f08506da31e55396d9b5 (commit) commit 728cb754e087cf0bbc2efa7167a8008b2c66752a Author: Matthew Brush mbr...@codebrainz.ca Date: Mon Oct 3 06:54:20 2011 -0700 Remove undo manager code and use GtkSourceView's undo manager. There was a call to mousepad_undo_lock() in mousepad-encoding-dialog.c that needs to be checked, since I wasn't sure what that call was for. mousepad/Makefile.am|2 - mousepad/mousepad-document.c|9 +- mousepad/mousepad-document.h|4 - mousepad/mousepad-encoding-dialog.c |3 - mousepad/mousepad-undo.c| 835 --- mousepad/mousepad-undo.h| 54 --- mousepad/mousepad-window.c | 58 ++-- 7 files changed, 31 insertions(+), 934 deletions(-) diff --git a/mousepad/Makefile.am b/mousepad/Makefile.am index 41b7b1e..3dfb8ac 100644 --- a/mousepad/Makefile.am +++ b/mousepad/Makefile.am @@ -46,8 +46,6 @@ mousepad_SOURCES = \ mousepad-statusbar.h \ mousepad-view.c \ mousepad-view.h \ - mousepad-undo.c \ - mousepad-undo.h \ mousepad-util.c \ mousepad-util.h \ mousepad-window.c \ diff --git a/mousepad/mousepad-document.c b/mousepad/mousepad-document.c index 2e39044..638f639 100644 --- a/mousepad/mousepad-document.c +++ b/mousepad/mousepad-document.c @@ -33,7 +33,6 @@ #include mousepad/mousepad-document.h #include mousepad/mousepad-marshal.h #include mousepad/mousepad-view.h -#include mousepad/mousepad-undo.h #include mousepad/mousepad-preferences.h #include mousepad/mousepad-window.h @@ -185,7 +184,7 @@ mousepad_document_init (MousepadDocument *document) gtk_scrolled_window_set_vadjustment (GTK_SCROLLED_WINDOW (document), NULL); /* create a textbuffer */ - document-buffer = gtk_text_buffer_new (NULL); + document-buffer = GTK_TEXT_BUFFER (gtk_source_buffer_new (NULL)); /* initialize the file */ document-file = mousepad_file_new (document-buffer); @@ -193,9 +192,6 @@ mousepad_document_init (MousepadDocument *document) /* connect signals to the file */ g_signal_connect_swapped (G_OBJECT (document-file), filename-changed, G_CALLBACK (mousepad_document_filename_changed), document); - /* initialize the undo manager */ - document-undo = mousepad_undo_new (document-buffer); - /* create the highlight tag */ document-tag = gtk_text_buffer_create_tag (document-buffer, NULL, background, #78, NULL); @@ -255,9 +251,6 @@ mousepad_document_finalize (GObject *object) g_free (document-priv-utf8_filename); g_free (document-priv-utf8_basename); - /* release the undo manager */ - g_object_unref (G_OBJECT (document-undo)); - /* release the file */ g_object_unref (G_OBJECT (document-file)); diff --git a/mousepad/mousepad-document.h b/mousepad/mousepad-document.h index 2daff7f..f2176c1 100644 --- a/mousepad/mousepad-document.h +++ b/mousepad/mousepad-document.h @@ -21,7 +21,6 @@ G_BEGIN_DECLS #include mousepad/mousepad-util.h #include mousepad/mousepad-file.h -#include mousepad/mousepad-undo.h #include mousepad/mousepad-view.h typedef struct _MousepadDocumentPrivate MousepadDocumentPrivate; @@ -47,9 +46,6 @@ struct _MousepadDocument /* file */ MousepadFile*file; - /* undo manager */ - MousepadUndo*undo; - /* text buffer */ GtkTextBuffer *buffer; diff --git a/mousepad/mousepad-encoding-dialog.c b/mousepad/mousepad-encoding-dialog.c index 953bfbd..7d4ce76 100644 --- a/mousepad/mousepad-encoding-dialog.c +++ b/mousepad/mousepad-encoding-dialog.c @@ -213,9 +213,6 @@ mousepad_encoding_dialog_init (MousepadEncodingDialog *dialog) mousepad_view_set_line_numbers (dialog-document-textview, FALSE); mousepad_document_set_word_wrap (dialog-document, FALSE); gtk_widget_show (GTK_WIDGET (dialog-document)); - - /* lock undo manager forever */ - mousepad_undo_lock (dialog-document-undo); } diff --git a/mousepad/mousepad-undo.c b/mousepad/mousepad-undo.c deleted file mode 100644 index ecea5cd..000 --- a/mousepad/mousepad-undo.c +++ /dev/null @@ -1,835 +0,0 @@ -/* - * This program is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by the Free - * Software Foundation; either version 2 of the License, or (at your option) - * any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for - * more details. - * - * You should have received a copy of the GNU General Public License along with - * this program; if not, write to the Free Software Foundation, Inc., 59 Temple - * Place, Suite 330, Boston, MA 02111-1307 USA -
[Xfce4-commits] mousepad:master Add initial filetype/language support and guess on file open.
Updating branch refs/heads/master to 82b6e834ddeea4be8bf901307e6e093bde24631c (commit) from cc401c48985b9f06c855cac39175ddcbe0efe091 (commit) commit 82b6e834ddeea4be8bf901307e6e093bde24631c Author: Matthew Brush mbr...@codebrainz.ca Date: Mon Oct 3 21:48:03 2011 -0700 Add initial filetype/language support and guess on file open. Still need to add UI elements to let user select language to use. mousepad/mousepad-file.c| 82 +++ mousepad/mousepad-file.h| 12 ++ mousepad/mousepad-private.h |2 + 3 files changed, 96 insertions(+), 0 deletions(-) diff --git a/mousepad/mousepad-file.c b/mousepad/mousepad-file.c index b45c980..2e4a86c 100644 --- a/mousepad/mousepad-file.c +++ b/mousepad/mousepad-file.c @@ -393,6 +393,85 @@ mousepad_file_get_line_ending (MousepadFile *file) +void +mousepad_file_set_language (MousepadFile *file, +GtkSourceLanguage *language) +{ + mousepad_return_if_fail (MOUSEPAD_IS_FILE (file)); + mousepad_return_if_fail (GTK_IS_SOURCE_BUFFER (file-buffer)); + + gtk_source_buffer_set_language (GTK_SOURCE_BUFFER (file-buffer), language); +} + + + +GtkSourceLanguage * +mousepad_file_get_language (MousepadFile *file) +{ + mousepad_return_val_if_fail (MOUSEPAD_IS_FILE (file), NULL); + mousepad_return_val_if_fail (GTK_IS_SOURCE_BUFFER (file-buffer), NULL); + + return gtk_source_buffer_get_language (GTK_SOURCE_BUFFER (file-buffer)); +} + + + +void +mousepad_file_set_language_id (MousepadFile *file, + const gchar *language_id) +{ + GtkSourceLanguage *lang; + + mousepad_return_if_fail (MOUSEPAD_IS_FILE (file)); + mousepad_return_if_fail (GTK_IS_SOURCE_BUFFER (file-buffer)); + + if (G_UNLIKELY (language_id == NULL)) +{ + gtk_source_buffer_set_language (GTK_SOURCE_BUFFER (file-buffer), NULL); + return; +} + + lang = gtk_source_language_manager_get_language (gtk_source_language_manager_get_default (), language_id); + mousepad_file_set_language (file, lang); +} + + + +const gchar * +mousepad_file_get_language_id (MousepadFile *file) +{ + GtkSourceLanguage *lang; + + lang = mousepad_file_get_language (file); + return (lang != NULL) ? gtk_source_language_get_id (lang) : NULL; +} + + + +GtkSourceLanguage * +mousepad_file_guess_language (MousepadFile *file) +{ + gchar *content_type; + gboolean result_uncertain; + GtkSourceLanguage *language = NULL; + + content_type = g_content_type_guess (file-filename, NULL, 0, result_uncertain); + if (result_uncertain) +{ + g_free (content_type); + content_type = NULL; +} + + language = gtk_source_language_manager_guess_language (gtk_source_language_manager_get_default (), + file-filename, + content_type); + g_free (content_type); + + return language; +} + + + gint mousepad_file_open (MousepadFile *file, const gchar *template_filename, @@ -604,6 +683,9 @@ mousepad_file_open (MousepadFile *file, g_mapped_file_free (mapped_file); #endif + /* guess and set the file's filetype/language */ + mousepad_file_set_language (file, mousepad_file_guess_language (file)); + /* this does not count as a modified buffer */ gtk_text_buffer_set_modified (file-buffer, FALSE); } diff --git a/mousepad/mousepad-file.h b/mousepad/mousepad-file.h index 18c5b6e..e9a8be3 100644 --- a/mousepad/mousepad-file.h +++ b/mousepad/mousepad-file.h @@ -68,6 +68,18 @@ voidmousepad_file_set_line_ending (MousepadFile MousepadLineEnding mousepad_file_get_line_ending (MousepadFile *file); +voidmousepad_file_set_language (MousepadFile *file, +GtkSourceLanguage *language); + +GtkSourceLanguage *mousepad_file_get_language (MousepadFile *file); + +voidmousepad_file_set_language_id (MousepadFile *file, +const gchar *language_id); + +const gchar*mousepad_file_get_language_id (MousepadFile *file); + +GtkSourceLanguage *mousepad_file_guess_language (MousepadFile *file); + gintmousepad_file_open (MousepadFile *file, const gchar *template_filename, GError **error); diff --git a/mousepad/mousepad-private.h b/mousepad/mousepad-private.h index 85fae3c..921767b 100644 --- a/mousepad/mousepad-private.h +++ b/mousepad/mousepad-private.h @@ -24,6 +24,8 @@ #include gtksourceview/gtksourceview.h #include
[Xfce4-commits] mousepad:master Update statusbar filetype when notebook pages are changed.
Updating branch refs/heads/master to ba38b4940b2998c30ba9bde6c707bf1c589cae0b (commit) from 82b6e834ddeea4be8bf901307e6e093bde24631c (commit) commit ba38b4940b2998c30ba9bde6c707bf1c589cae0b Author: Matthew Brush mbr...@codebrainz.ca Date: Mon Oct 3 22:33:51 2011 -0700 Update statusbar filetype when notebook pages are changed. Note the FIXME in the comments, this will probably need some refactoring. mousepad/mousepad-statusbar.c | 31 +++ mousepad/mousepad-statusbar.h |3 +++ mousepad/mousepad-window.c|8 +++- 3 files changed, 41 insertions(+), 1 deletions(-) diff --git a/mousepad/mousepad-statusbar.c b/mousepad/mousepad-statusbar.c index 9ed0d94..a7da0f8 100644 --- a/mousepad/mousepad-statusbar.c +++ b/mousepad/mousepad-statusbar.c @@ -50,6 +50,7 @@ struct _MousepadStatusbar guint overwrite_enabled : 1; /* extra labels in the statusbar */ + GtkWidget *language; GtkWidget *position; GtkWidget *overwrite; }; @@ -119,6 +120,16 @@ mousepad_statusbar_init (MousepadStatusbar *statusbar) separator = gtk_vseparator_new (); gtk_box_pack_start (GTK_BOX (box), separator, FALSE, FALSE, 0); gtk_widget_show (separator); + + /* language/filetype */ + statusbar-language = gtk_label_new (_(Filetype: None)); + gtk_box_pack_start (GTK_BOX (box), statusbar-language, FALSE, TRUE, 0); + gtk_widget_show (statusbar-language); + + /* separator */ + separator = gtk_vseparator_new (); + gtk_box_pack_start (GTK_BOX (box), separator, FALSE, FALSE, 0); + gtk_widget_show (separator); /* line and column numbers */ statusbar-position = gtk_label_new (NULL); @@ -169,6 +180,26 @@ mousepad_statusbar_overwrite_clicked (GtkWidget *widget, void +mousepad_statusbar_set_language (MousepadStatusbar *statusbar, + GtkSourceLanguage *language) +{ + gchar *label; + + mousepad_return_if_fail (MOUSEPAD_IS_STATUSBAR (statusbar)); + + if (language == NULL) + gtk_label_set_text (GTK_LABEL (statusbar-language), _(Filetype: None)); + else +{ + label = g_strdup_printf (_(Filetype: %s), gtk_source_language_get_name (language)); + gtk_label_set_text (GTK_LABEL (statusbar-language), label); + g_free (label); +} +} + + + +void mousepad_statusbar_set_cursor_position (MousepadStatusbar *statusbar, gint line, gint column, diff --git a/mousepad/mousepad-statusbar.h b/mousepad/mousepad-statusbar.h index c44b54e..8ebe7a6 100644 --- a/mousepad/mousepad-statusbar.h +++ b/mousepad/mousepad-statusbar.h @@ -41,6 +41,9 @@ voidmousepad_statusbar_set_cursor_position (MousepadStatusbar *statusba voidmousepad_statusbar_set_overwrite(MousepadStatusbar *statusbar, gboolean overwrite); +voidmousepad_statusbar_set_language (MousepadStatusbar *statusbar, + GtkSourceLanguage *language); + G_END_DECLS #endif /* !__MOUSEPAD_STATUSBAR_H__ */ diff --git a/mousepad/mousepad-window.c b/mousepad/mousepad-window.c index 4c5e33e..54a3520 100644 --- a/mousepad/mousepad-window.c +++ b/mousepad/mousepad-window.c @@ -1306,7 +1306,8 @@ mousepad_window_notebook_switch_page (GtkNotebook *notebook, guintpage_num, MousepadWindow *window) { - MousepadDocument *document; + MousepadDocument *document; + GtkSourceLanguage *language; mousepad_return_if_fail (MOUSEPAD_IS_WINDOW (window)); mousepad_return_if_fail (GTK_IS_NOTEBOOK (notebook)); @@ -1328,6 +1329,11 @@ mousepad_window_notebook_switch_page (GtkNotebook *notebook, /* update the statusbar */ mousepad_document_send_signals (window-active); + + /* set the filetype in the status bar + * FIXME: this doesn't belong here */ + language = gtk_source_buffer_get_language (GTK_SOURCE_BUFFER (window-active-buffer)); + mousepad_statusbar_set_language (MOUSEPAD_STATUSBAR (window-statusbar), language); } } ___ Xfce4-commits mailing list Xfce4-commits@xfce.org https://mail.xfce.org/mailman/listinfo/xfce4-commits
[Xfce4-commits] mousepad:master Add colour scheme support.
Updating branch refs/heads/master to cc401c48985b9f06c855cac39175ddcbe0efe091 (commit) from 9a6ad0cb703ec1ef475458cec656cbeef9d865dc (commit) commit cc401c48985b9f06c855cac39175ddcbe0efe091 Author: Matthew Brush mbr...@codebrainz.ca Date: Mon Oct 3 20:06:24 2011 -0700 Add colour scheme support. * Add new preference 'color-scheme' that stores the scheme's ID string. * Add new 'Color Schemes' menu and placeholder for items to UI XML file. * Add new actions for all colour schemes and merge into UI manager menu. * Handle actions by looping though all textview widgets and setting style. * Using 'g_str_hash' of scheme id for radio action value which might be bad. mousepad/mousepad-document.c| 18 +++- mousepad/mousepad-preferences.c |9 ++ mousepad/mousepad-private.h |2 + mousepad/mousepad-window-ui.xml |4 + mousepad/mousepad-window.c | 196 +++ 5 files changed, 224 insertions(+), 5 deletions(-) diff --git a/mousepad/mousepad-document.c b/mousepad/mousepad-document.c index 638f639..1f80b12 100644 --- a/mousepad/mousepad-document.c +++ b/mousepad/mousepad-document.c @@ -163,11 +163,12 @@ mousepad_document_class_init (MousepadDocumentClass *klass) static void mousepad_document_init (MousepadDocument *document) { - GtkTargetList *target_list; - gboolean word_wrap, auto_indent, line_numbers, insert_spaces; - gchar *font_name; - gint tab_size; - MousepadPreferences *preferences; + GtkTargetList*target_list; + gboolean word_wrap, auto_indent, line_numbers, insert_spaces; + gchar*font_name, *color_scheme; + gint tab_size; + GtkSourceStyleScheme *scheme = NULL; + MousepadPreferences *preferences; /* private structure */ document-priv = MOUSEPAD_DOCUMENT_GET_PRIVATE (document); @@ -215,6 +216,7 @@ mousepad_document_init (MousepadDocument *document) view-font-name, font_name, view-tab-size, tab_size, view-insert-spaces, insert_spaces, +view-color-scheme, color_scheme, NULL); /* release the preferences */ @@ -227,9 +229,15 @@ mousepad_document_init (MousepadDocument *document) mousepad_view_set_auto_indent (document-textview, auto_indent); mousepad_view_set_tab_size (document-textview, tab_size); mousepad_view_set_insert_spaces (document-textview, insert_spaces); + + if (g_strcmp0 (color_scheme, none) != 0) +scheme = gtk_source_style_scheme_manager_get_scheme (gtk_source_style_scheme_manager_get_default (), color_scheme); + gtk_source_buffer_set_highlight_syntax (GTK_SOURCE_BUFFER (document-buffer), (scheme != NULL)); + gtk_source_buffer_set_style_scheme (GTK_SOURCE_BUFFER (document-buffer), scheme); /* cleanup */ g_free (font_name); + g_free (color_scheme); /* attach signals to the text view and buffer */ g_signal_connect (G_OBJECT (document-buffer), notify::cursor-position, G_CALLBACK (mousepad_document_notify_cursor_position), document); diff --git a/mousepad/mousepad-preferences.c b/mousepad/mousepad-preferences.c index cbf1ec1..5b45b71 100644 --- a/mousepad/mousepad-preferences.c +++ b/mousepad/mousepad-preferences.c @@ -61,6 +61,7 @@ enum PROP_VIEW_TAB_WIDTH, PROP_VIEW_TABS_AS_SPACES, PROP_VIEW_WORD_WRAP, + PROP_VIEW_COLOR_SCHEME, /* window preferences */ PROP_WINDOW_HEIGHT, @@ -213,6 +214,14 @@ mousepad_preferences_class_init (MousepadPreferencesClass *klass) NULL, FALSE, MOUSEPAD_PARAM_READWRITE)); + + g_object_class_install_property (gobject_class, + PROP_VIEW_COLOR_SCHEME, + g_param_spec_string (view-color-scheme, +ViewColorScheme, +NULL, +none, + MOUSEPAD_PARAM_READWRITE)); /** diff --git a/mousepad/mousepad-private.h b/mousepad/mousepad-private.h index 520a9f7..85fae3c 100644 --- a/mousepad/mousepad-private.h +++ b/mousepad/mousepad-private.h @@ -22,6 +22,8 @@ #include gtk/gtk.h #include glib/gi18n.h #include gtksourceview/gtksourceview.h +#include gtksourceview/gtksourcestylescheme.h +#include gtksourceview/gtksourcestyleschememanager.h G_BEGIN_DECLS diff --git a/mousepad/mousepad-window-ui.xml b/mousepad/mousepad-window-ui.xml index b6b6575..2fd1c3f 100644 --- a/mousepad/mousepad-window-ui.xml +++ b/mousepad/mousepad-window-ui.xml @@ -68,6 +68,10 @@ menuitem action=font / separator / menuitem action=statusbar / + separator