Date: Tue, 19 Jul 2005 10:23:28 +0200 From: "Piotr Smyrak" <piotr.smyrak@heron.pl> To: "FreeBSD gnats submit" <FreeBSD-gnats-submit@FreeBSD.org> Subject: ports/83712: [patch] update graphics/gcolor2 to 0.4 Message-ID: <1121761408.0@smyru.mshome.net> Resent-Message-ID: <200507190830.j6J8UEuR077049@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 83712 >Category: ports >Synopsis: [patch] update graphics/gcolor2 to 0.4 >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: maintainer-update >Submitter-Id: current-users >Arrival-Date: Tue Jul 19 08:30:14 GMT 2005 >Closed-Date: >Last-Modified: >Originator: Piotr Smyrak >Release: FreeBSD 5.4-STABLE i386 >Organization: >Environment: System: FreeBSD 5.4-STABLE #0: Mon Jun 20 10:36:01 CEST 2005 root@smyru.smyrak.com:/usr/obj/usr/src/sys/SMYRU >Description: The patch updates the port to new 0.4 version. >How-To-Repeat: N/A >Fix: --- gcolor2.diff begins here --- diff -Naru gcolor2.orig/Makefile gcolor2/Makefile --- gcolor2.orig/Makefile Mon Jul 18 11:23:51 2005 +++ gcolor2/Makefile Mon Jul 18 11:25:59 2005 @@ -6,7 +6,7 @@ # PORTNAME= gcolor2 -PORTVERSION= 0.3 +PORTVERSION= 0.4 CATEGORIES= graphics gnome MASTER_SITES= ${MASTER_SITE_SOURCEFORGE} MASTER_SITE_SUBDIR= ${PORTNAME} diff -Naru gcolor2.orig/distinfo gcolor2/distinfo --- gcolor2.orig/distinfo Mon Jul 18 11:23:51 2005 +++ gcolor2/distinfo Mon Jul 18 11:31:57 2005 @@ -1,2 +1,2 @@ -MD5 (gcolor2-0.3.tar.gz) = c247333e134b1e93132ab7568b9c0986 -SIZE (gcolor2-0.3.tar.gz) = 356892 +MD5 (gcolor2-0.4.tar.gz) = 02de9d925ad5921522685f402caec3ec +SIZE (gcolor2-0.4.tar.gz) = 375217 diff -Naru gcolor2.orig/files/patch-src_callbacks.c gcolor2/files/patch-src_callbacks.c --- gcolor2.orig/files/patch-src_callbacks.c Mon Jul 18 11:23:51 2005 +++ gcolor2/files/patch-src_callbacks.c Thu Jan 1 01:00:00 1970 @@ -1,98 +0,0 @@ ---- src/callbacks.c.orig Tue Apr 19 00:37:37 2005 -+++ src/callbacks.c Tue Apr 19 00:39:22 2005 -@@ -126,8 +126,9 @@ - - if (gtk_tree_selection_get_selected (selection, &model, &selection_iter)) - { -+ GtkColorSelection *colorsel; - gtk_tree_model_get (model, &selection_iter, COLOR_VALUE, &color, COLOR_TYPE, &type, -1); -- GtkColorSelection *colorsel = GTK_COLOR_SELECTION (lookup_widget (gcolor2, "colorselection1")); -+ colorsel = GTK_COLOR_SELECTION (lookup_widget (gcolor2, "colorselection1")); - gdk_color_parse (color, &new_color); - - /* save the old color */ -@@ -249,9 +250,10 @@ - on_save_button_clicked (GtkButton *button, - gpointer user_data) - { -+ gint result; - savedialog = create_save_dialog (); - gtk_window_set_transient_for (GTK_WINDOW (savedialog), GTK_WINDOW (gcolor2)); -- gint result = gtk_dialog_run (GTK_DIALOG (savedialog)); -+ result = gtk_dialog_run (GTK_DIALOG (savedialog)); - switch (result) - { - case GTK_RESPONSE_OK: -@@ -269,18 +271,19 @@ - save_selected_color () - { - GtkWidget *entry = lookup_widget (savedialog, "entry1"); -+ GtkTreeView *list; -+ FILE *fp; -+ gint r, g, b; -+ gchar old[512] = ""; - colorname = g_strdup (gtk_entry_get_text (GTK_ENTRY (entry))); - add_list_color (colorvalue, colorname, "user", TRUE); - -- GtkTreeView *list = GTK_TREE_VIEW (lookup_widget (gcolor2, "treeview1")); -+ list = GTK_TREE_VIEW (lookup_widget (gcolor2, "treeview1")); - gtk_tree_view_scroll_to_cell (list, gtk_tree_path_new_first (), NULL, FALSE, 0, 0); - gtk_tree_selection_select_path (gtk_tree_view_get_selection (list), gtk_tree_path_new_first ()); - - - /* save color in user file - write at top of the file */ -- FILE *fp; -- gint r, g, b; -- gchar old[512] = ""; - - sscanf (colorvalue, "#%2x%2x%2x", &r, &g, &b); - fp = fopen (get_filename (), "r"); -@@ -307,8 +310,9 @@ - gpointer user_data) - { - GtkWidget *deletedialog = create_delete_dialog (); -+ gint result; - gtk_window_set_transient_for (GTK_WINDOW (deletedialog), GTK_WINDOW (gcolor2)); -- gint result = gtk_dialog_run (GTK_DIALOG (deletedialog)); -+ result = gtk_dialog_run (GTK_DIALOG (deletedialog)); - switch (result) - { - case GTK_RESPONSE_OK: -@@ -330,15 +334,22 @@ - - gchar *selection_color_name; - gchar *selection_color_value; -- gtk_tree_model_get (model, &selection_iter, COLOR_VALUE, &selection_color_value, COLOR_NAME, &selection_color_name, -1); -- -- -- /* remove from file */ -+ - FILE *fp; - gchar *p; - gchar buffer[512] = ""; - gchar newstuff[512] = ""; - -+ gint r, g, b; -+ gchar *file_color_name; -+ gchar file_color_value[8]; -+ gboolean found = FALSE; -+ -+ gtk_tree_model_get (model, &selection_iter, COLOR_VALUE, &selection_color_value, COLOR_NAME, &selection_color_name, -1); -+ -+ -+ /* remove from file */ -+ - fp = fopen (get_filename (), "r"); - if (fp == NULL) - { -@@ -346,10 +357,6 @@ - return; - } - -- gint r, g, b; -- gchar *file_color_name; -- gchar file_color_value[8]; -- gboolean found = FALSE; - while ((p = fgets (buffer, sizeof buffer, fp)) != NULL) - { - if (buffer[0] == '!') diff -Naru gcolor2.orig/files/patch-src_main.c gcolor2/files/patch-src_main.c --- gcolor2.orig/files/patch-src_main.c Mon Jul 18 11:23:51 2005 +++ gcolor2/files/patch-src_main.c Thu Jan 1 01:00:00 1970 @@ -1,26 +0,0 @@ ---- src/main.c.orig Tue Oct 19 07:37:18 2004 -+++ src/main.c Tue Apr 19 00:37:09 2005 -@@ -17,8 +17,9 @@ - get_filename() - { - gchar buf[50]; -+ gchar* file; - g_sprintf (buf, "%s/.rgb.txt", getenv ("HOME")); -- gchar* file = g_strdup (buf); -+ file = g_strdup (buf); - return file; - } - -@@ -48,10 +49,11 @@ - "................" - }; - gchar colorline[] = ". c #FFFFFF"; -+ GdkPixbuf *buf; - - g_sprintf (colorline, ". c %s", g_ascii_strup (spec, -1)); - swatchxpm[1] = colorline; -- GdkPixbuf *buf = gdk_pixbuf_new_from_xpm_data ((gchar const **)swatchxpm); -+ buf = gdk_pixbuf_new_from_xpm_data ((gchar const **)swatchxpm); - - if (is_top) - gtk_list_store_prepend (liststore, &iter); --- gcolor2.diff ends here --- >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1121761408.0>