diff --git a/editors/leafpad/Makefile b/editors/leafpad/Makefile index 361ac1a6eb06..f25e907bea95 100644 --- a/editors/leafpad/Makefile +++ b/editors/leafpad/Makefile @@ -6,8 +6,7 @@ # PORTNAME= leafpad -PORTVERSION= 0.7.9 -PORTREVISION= 2 +PORTVERSION= 0.8.1 CATEGORIES= editors MASTER_SITES= ${MASTER_SITE_SAVANNAH} MASTER_SITE_SUBDIR= ${PORTNAME} @@ -22,22 +21,10 @@ GNU_CONFIGURE= yes CONFIGURE_ENV= CPPFLAGS="-I${LOCALBASE}/include -I${X11BASE}/include ${PTHREAD_CFLAGS}" \ LDFLAGS="-L${LOCALBASE}/lib -L${X11BASE}/lib ${PTHREAD_LIBS}" \ PTHREAD_LIB="${PTHREAD_LIBS}" +CONFIGURE_ARGS= --enable-chooser +.if !defined(NOPORTDOCS) PORTDOCS= AUTHORS COPYING ChangeLog INSTALL README - -.if defined (WITH_NEW_SELECTOR) -EXTRA_PATCHES= ${FILESDIR}/extra-new-selector.patch -.endif - -pre-everything:: -.if !defined(WITH_NEW_SELECTOR) - @${ECHO_MSG} "" - @${ECHO_MSG} "You may choose to compile with unsupported patch" - @${ECHO_MSG} "that lets leafpad use the new GTK file selector." - @${ECHO_MSG} "Define:" - @${ECHO_MSG} "" - @${ECHO_MSG} " WITH_NEW_SELECTOR=yes" - @${ECHO_MSG} "" .endif post-patch: diff --git a/editors/leafpad/distinfo b/editors/leafpad/distinfo index 17cb8de57810..c75874469a13 100644 --- a/editors/leafpad/distinfo +++ b/editors/leafpad/distinfo @@ -1,2 +1,2 @@ -MD5 (leafpad-0.7.9.tar.gz) = 01d851421f554cce3867e39bb258c414 -SIZE (leafpad-0.7.9.tar.gz) = 192633 +MD5 (leafpad-0.8.1.tar.gz) = 4e640c48b45f5963109b376b57a4c2be +SIZE (leafpad-0.8.1.tar.gz) = 212845 diff --git a/editors/leafpad/files/extra-new-selector.patch b/editors/leafpad/files/extra-new-selector.patch deleted file mode 100644 index f0c86d93cfdb..000000000000 --- a/editors/leafpad/files/extra-new-selector.patch +++ /dev/null @@ -1,130 +0,0 @@ ---- src/callback.c.orig Mon Dec 20 12:58:26 2004 -+++ src/callback.c Thu Feb 3 20:08:07 2005 -@@ -93,7 +93,7 @@ - - if (!check_text_modification(sd)) { - // fi = get_file_info_by_selector(OPEN, sd->fi); -- fi = get_fileinfo_from_selector(sd->mainwin->window, sd->fi, OPEN); -+ fi = get_fileinfo_from_chooser(sd->mainwin->window, sd->fi, OPEN); - if (fi) { - if (file_open_real(sd->mainwin->textview, fi)) { - g_free(fi); -@@ -123,7 +123,7 @@ - { - FileInfo *fi; - -- fi = get_fileinfo_from_selector(sd->mainwin->window, sd->fi, SAVE); -+ fi = get_fileinfo_from_chooser(sd->mainwin->window, sd->fi, SAVE); - if (fi) { - if (file_save_real(sd->mainwin->textview, fi)) - g_free(fi); ---- src/selector.c.orig Fri Dec 24 10:35:12 2004 -+++ src/selector.c Thu Feb 3 21:02:00 2005 -@@ -310,7 +310,7 @@ - return option_menu; - } - --static GtkWidget *create_file_selector(FileInfo *selected_fi) -+static GtkWidget *create_file_chooser(FileInfo *selected_fi, GtkWidget *window) - { - GtkWidget *filesel; - GtkWidget *align; -@@ -322,12 +322,19 @@ - - title = mode ? _("Open") : _("Save As"); - -- filesel = gtk_file_selection_new(title); --// gtk_window_set_transient_for(GTK_WINDOW(filesel), GTK_WINDOW(window)); -+ if(mode == OPEN) -+ filesel = gtk_file_chooser_dialog_new(title, GTK_WINDOW(window), -+ GTK_FILE_CHOOSER_ACTION_OPEN, -+ GTK_STOCK_CANCEL,GTK_RESPONSE_CANCEL, -+ GTK_STOCK_OPEN, GTK_RESPONSE_ACCEPT,NULL); -+ else -+ filesel = gtk_file_chooser_dialog_new(title, GTK_WINDOW(window), -+ GTK_FILE_CHOOSER_ACTION_SAVE, -+ GTK_STOCK_CANCEL,GTK_RESPONSE_CANCEL, -+ GTK_STOCK_SAVE,GTK_RESPONSE_ACCEPT,NULL); - - align = gtk_alignment_new(1, 0, 0, 0); -- gtk_box_pack_end(GTK_BOX(GTK_FILE_SELECTION(filesel)->main_vbox), -- align, FALSE, FALSE, 0); -+ gtk_file_chooser_set_extra_widget(GTK_FILE_CHOOSER(filesel),align); - table = gtk_table_new(2, 2, FALSE); - gtk_table_set_row_spacings(GTK_TABLE(table), 5); - gtk_container_add(GTK_CONTAINER(align), table); -@@ -340,15 +347,15 @@ - option_menu_lineend = create_lineend_menu(selected_fi); - gtk_table_attach_defaults(GTK_TABLE(table), option_menu_lineend, 1, 2, 0, 1); - } -- gtk_widget_show_all(GTK_FILE_SELECTION(filesel)->main_vbox); -+ gtk_widget_show_all(GTK_FILE_CHOOSER(filesel)); - - if (selected_fi->filename) -- gtk_file_selection_set_filename(GTK_FILE_SELECTION(filesel), selected_fi->filename); -+ gtk_file_chooser_select_filename(GTK_FILE_CHOOSER(filesel), selected_fi->filename); - - return filesel; - } - --FileInfo *get_fileinfo_from_selector(GtkWidget *window, FileInfo *fi, gint requested_mode) -+FileInfo *get_fileinfo_from_chooser(GtkWidget *window, FileInfo *fi, gint requested_mode) - { - FileInfo *selected_fi; - GtkWidget *filesel; -@@ -366,24 +373,24 @@ - selected_fi->manual_charset = - fi->manual_charset ? g_strdup(fi->manual_charset) : NULL; - -- filesel = create_file_selector(selected_fi); -+ filesel = create_file_chooser(selected_fi,window); - - gtk_window_set_transient_for(GTK_WINDOW(filesel), GTK_WINDOW(window)); - - do { - res = gtk_dialog_run(GTK_DIALOG(filesel)); -- if (res == GTK_RESPONSE_OK) { -+ if (res == GTK_RESPONSE_ACCEPT) { - if (selected_fi->filename) - g_free(selected_fi->filename); - selected_fi->filename = g_strdup( -- gtk_file_selection_get_filename(GTK_FILE_SELECTION(filesel))); -+ gtk_file_chooser_get_filename(GTK_FILE_CHOOSER(filesel))); - if (g_file_test(selected_fi->filename, G_FILE_TEST_IS_DIR)) { - len = strlen(selected_fi->filename); - if (len < 1 || selected_fi->filename[len - 1] != G_DIR_SEPARATOR) - str = g_strconcat(selected_fi->filename, G_DIR_SEPARATOR_S, NULL); - else - str = g_strdup(selected_fi->filename); -- gtk_file_selection_set_filename(GTK_FILE_SELECTION(filesel), str); -+ gtk_file_chooser_set_filename(GTK_FILE_CHOOSER(filesel), str); - g_free(str); - continue; - } -@@ -397,14 +404,14 @@ - case GTK_RESPONSE_NO: - continue; - case GTK_RESPONSE_YES: -- res = GTK_RESPONSE_OK; -+ res = GTK_RESPONSE_ACCEPT; - } - } - } - gtk_widget_hide(filesel); - } while (GTK_WIDGET_VISIBLE(filesel)); - -- if (res != GTK_RESPONSE_OK) { -+ if (res != GTK_RESPONSE_ACCEPT) { - if (selected_fi->charset) - g_free(selected_fi->charset); - if (selected_fi->manual_charset) ---- src/selector.h.orig Thu Feb 3 20:17:09 2005 -+++ src/selector.h Thu Feb 3 20:17:27 2005 -@@ -30,6 +30,6 @@ - OPEN - }; - --FileInfo *get_fileinfo_from_selector(GtkWidget *window, FileInfo *fi, gint requested_mode); -+FileInfo *get_fileinfo_from_chooser(GtkWidget *window, FileInfo *fi, gint requested_mode); - - #endif /* _SELECTOR_H */ diff --git a/editors/leafpad/pkg-plist b/editors/leafpad/pkg-plist index 691b8453e4d1..49b35bdc88dc 100644 --- a/editors/leafpad/pkg-plist +++ b/editors/leafpad/pkg-plist @@ -1,6 +1,7 @@ bin/leafpad share/gnome/applications/leafpad.desktop share/gnome/pixmaps/leafpad.png +share/locale/bg/LC_MESSAGES/leafpad.mo share/locale/ca/LC_MESSAGES/leafpad.mo share/locale/cs/LC_MESSAGES/leafpad.mo share/locale/de/LC_MESSAGES/leafpad.mo @@ -11,11 +12,12 @@ share/locale/it/LC_MESSAGES/leafpad.mo share/locale/ja/LC_MESSAGES/leafpad.mo share/locale/lt/LC_MESSAGES/leafpad.mo share/locale/pl/LC_MESSAGES/leafpad.mo +share/locale/pt/LC_MESSAGES/leafpad.mo share/locale/ru/LC_MESSAGES/leafpad.mo share/locale/sv/LC_MESSAGES/leafpad.mo share/locale/ta/LC_MESSAGES/leafpad.mo +share/locale/vi/LC_MESSAGES/leafpad.mo share/locale/zh_CN/LC_MESSAGES/leafpad.mo share/locale/zh_TW/LC_MESSAGES/leafpad.mo -%%PORTDOCS%%@dirrm %%DOCSDIR%% @exec %%LOCALBASE%%/bin/update-desktop-database > /dev/null || /usr/bin/true @unexec %%LOCALBASE%%/bin/update-desktop-database > /dev/null || /usr/bin/true