r40120 - in /packages/unstable/xchat-gnome/debian: changelog patches/01_finish_gtk3_port.patch patches/series

joss at users.alioth.debian.org joss at users.alioth.debian.org
Sat Oct 26 18:57:53 UTC 2013


Author: joss
Date: Sat Oct 26 18:57:53 2013
New Revision: 40120

URL: http://svn.debian.org/wsvn/pkg-gnome/?sc=1&rev=40120
Log:
01_finish_gtk3_port.patch: new patch. Imported from BZ#677043, 
contains the missing pieces of the GTK3 port.

Added:
    packages/unstable/xchat-gnome/debian/patches/01_finish_gtk3_port.patch
Modified:
    packages/unstable/xchat-gnome/debian/changelog
    packages/unstable/xchat-gnome/debian/patches/series

Modified: packages/unstable/xchat-gnome/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-gnome/packages/unstable/xchat-gnome/debian/changelog?rev=40120&op=diff
==============================================================================
--- packages/unstable/xchat-gnome/debian/changelog	[utf-8] (original)
+++ packages/unstable/xchat-gnome/debian/changelog	[utf-8] Sat Oct 26 18:57:53 2013
@@ -1,3 +1,10 @@
+xchat-gnome (1:0.30.0~git20131003.d20b8d-2) UNRELEASED; urgency=low
+
+  * 01_finish_gtk3_port.patch: new patch. Imported from BZ#677043, 
+    contains the missing pieces of the GTK3 port.
+
+ -- Josselin Mouette <joss at debian.org>  Sat, 26 Oct 2013 20:01:40 +0200
+
 xchat-gnome (1:0.30.0~git20131003.d20b8d-1) unstable; urgency=low
 
   [ Jeremy Bicha ]

Added: packages/unstable/xchat-gnome/debian/patches/01_finish_gtk3_port.patch
URL: http://svn.debian.org/wsvn/pkg-gnome/packages/unstable/xchat-gnome/debian/patches/01_finish_gtk3_port.patch?rev=40120&op=file
==============================================================================
--- packages/unstable/xchat-gnome/debian/patches/01_finish_gtk3_port.patch	(added)
+++ packages/unstable/xchat-gnome/debian/patches/01_finish_gtk3_port.patch	[utf-8] Sat Oct 26 18:57:53 2013
@@ -0,0 +1,383 @@
+Index: xchat-gnome-0.30.0~git20131003.d20b8d/src/fe-gnome/connect-dialog.c
+===================================================================
+--- xchat-gnome-0.30.0~git20131003.d20b8d.orig/src/fe-gnome/connect-dialog.c	2013-10-26 19:57:37.561541400 +0200
++++ xchat-gnome-0.30.0~git20131003.d20b8d/src/fe-gnome/connect-dialog.c	2013-10-26 19:57:37.537542358 +0200
+@@ -29,187 +29,117 @@
+ #include "../common/xchatc.h"
+ #include "../common/servlist.h"
+ 
+-static GtkDialogClass *parent_class;
+-
+ static void
+-connect_dialog_finalize (GObject *object)
++connekt_dialog_try_connecting (GtkWidget *server_list)
+ {
+-	ConnectDialog *dialog = (ConnectDialog *) object;
+-
+-	if (dialog->server_store) {
+-		g_object_unref (dialog->server_store);
+-		dialog->server_store = NULL;
+-	}
+-
+-	((GObjectClass *) parent_class)->finalize (object);
+-}
+-
+-static void
+-connect_dialog_class_init (ConnectDialogClass *klass)
+-{
+-	GObjectClass *object_class = (GObjectClass *) klass;
+-	object_class->finalize = connect_dialog_finalize;
+-}
+-
+-static void
+-selection_changed (GtkTreeSelection *select, ConnectDialog *dialog)
+-{
+-	if (gtk_tree_selection_get_selected (select, NULL, NULL)) {
+-		gtk_dialog_set_response_sensitive (GTK_DIALOG (dialog), GTK_RESPONSE_OK, TRUE);
+-	} else {
+-		gtk_dialog_set_response_sensitive (GTK_DIALOG (dialog), GTK_RESPONSE_OK, FALSE);
+-	}
+-}
+-
+-static void
+-dialog_response (ConnectDialog *dialog, gint response, gpointer data)
+-{
+-	if (response != GTK_RESPONSE_OK) {
+-		gtk_widget_destroy (GTK_WIDGET (dialog));
+-		return;
+-	}
+-
++	GtkTreeSelection *select;
+ 	GtkTreeModel *model;
+ 	GtkTreeIter iter;
++	session *s = NULL;
++	ircnet *net;
+ 
+-	GtkTreeSelection *select = gtk_tree_view_get_selection (GTK_TREE_VIEW (dialog->server_list));
+-	if (gtk_tree_selection_get_selected (select, &model, &iter)) {
+-		session *s = NULL;
+-		ircnet *net;
++	select = gtk_tree_view_get_selection (GTK_TREE_VIEW (server_list));
+ 
+-		// If the currently selected server is not connected, use it
+-		// for the new session.
+-		if (gui.current_session &&
+-		    (gui.current_session->server == NULL ||
+-		     gui.current_session->server->connected == FALSE)) {
++	if (gtk_tree_selection_get_selected (select, &model, &iter)) {
++		/* If the currently selected server is not connected, use it */
++		/* for the new session. */
++		if (gui.current_session && 
++				(gui.current_session->server == NULL || 
++				 gui.current_session->server->connected == FALSE)) 
++		{
+ 			s = gui.current_session;
+ 		}
+ 
+-		// Make sure that this network isn't already connected.
++		/* Make sure that this network isn't already connected. */
+ 		gtk_tree_model_get (model, &iter, 1, &net, -1);
+-		gboolean found = FALSE;
+-		for (GSList *i = sess_list; i; i = g_slist_next (i)) {
++
++		for (GSList *i = sess_list; i; i = g_slist_next (i)) 
++		{
+ 			session *sess = (session *)(i->data);
++
+ 			if (sess->type == SESS_SERVER &&
+-			    sess->server != NULL &&
+-			    sess->server->network == net &&
+-			    (sess->server->connected || sess->server->connecting)) {
+-				found = TRUE;
+-				break;
++					sess->server != NULL &&
++					sess->server->network == net &&
++			    	(sess->server->connected || sess->server->connecting)) 
++			{
++				return;
+ 			}
+ 		}
+-
+-		gtk_widget_destroy (GTK_WIDGET (dialog));
+-
+-		if(net->servlist == NULL) {
+-			GtkWidget *warning_dialog =
+-				gtk_message_dialog_new (NULL,
+-				                        GTK_DIALOG_MODAL | GTK_DIALOG_DESTROY_WITH_PARENT,
+-				                        GTK_MESSAGE_WARNING,
+-				                        GTK_BUTTONS_CLOSE,
+-				                        _("This network doesn't have a server defined."));
+-			gtk_message_dialog_format_secondary_text (GTK_MESSAGE_DIALOG (warning_dialog),
+-			                                          _("Please add at least one server to the %s network."),
+-			                                          net->name);
+-			gtk_dialog_run (GTK_DIALOG (warning_dialog));
+-			gtk_widget_destroy (warning_dialog);
+-
+-		} else if (!found) {
+-			servlist_connect (s, net, TRUE);
+-		}
++		
++		servlist_connect (s, net, TRUE);
+ 	}
+ }
+ 
+ static void
+-row_activated (GtkTreeView *widget, GtkTreePath *path, GtkTreeViewColumn *column, ConnectDialog *dialog)
++connekt_dialog_row_activated (GtkTreeView *widget, GtkTreePath *path, GtkTreeViewColumn *column, GtkDialog *dialog)
+ {
+-	GtkTreeIter iter;
+-	if (gtk_tree_model_get_iter (GTK_TREE_MODEL (dialog->server_store), &iter, path)) {
+-		gtk_dialog_response (GTK_DIALOG (dialog), GTK_RESPONSE_OK);
+-	}
++	gtk_dialog_response (dialog, GTK_RESPONSE_OK);
+ }
+ 
+-static void
+-connect_dialog_init (ConnectDialog *dialog)
++void
++connekt_dialog ()
+ {
+-	gchar *path = locate_data_file ("connect-dialog.glade");
+-	g_assert(path != NULL);
+-
+-	GtkBuilder *xml =  gtk_builder_new ();
+-	g_assert (gtk_builder_add_from_file ( xml, path, NULL) != 0);
+-
+-	g_free (path);
+-
+-#define GW(name) ((dialog->name) = GTK_WIDGET (gtk_builder_get_object (xml, #name)))
+-	GW(toplevel);
+-	GW(server_list);
+-#undef GW
+-
+-	g_object_unref (xml);
+-
+-	dialog->server_store = gtk_list_store_new (2, G_TYPE_STRING, G_TYPE_POINTER);
+-	gtk_tree_view_set_model (GTK_TREE_VIEW (dialog->server_list), GTK_TREE_MODEL (dialog->server_store));
+-
+-	GtkCellRenderer *renderer = gtk_cell_renderer_text_new ();
+-	GtkTreeViewColumn *column = gtk_tree_view_column_new_with_attributes ("name", renderer, "text", 0, NULL);
+-	gtk_tree_view_append_column (GTK_TREE_VIEW (dialog->server_list), column);
+-
+-	GtkWidget *button = gtk_button_new_with_mnemonic (_("C_onnect"));
+-	gtk_dialog_add_button (GTK_DIALOG (dialog), GTK_STOCK_CLOSE, GTK_RESPONSE_CLOSE);
+-	gtk_dialog_add_action_widget (GTK_DIALOG (dialog), button, GTK_RESPONSE_OK);
+-	gtk_container_set_border_width (GTK_CONTAINER (dialog), 6);
++	GtkWidget *dialog;
++	GtkWidget *content_area;
++	GtkWidget *scrolled_window;
++	GtkWidget *server_list;
++	GtkListStore *server_store;
+ 
+-	GtkWidget *content_area = gtk_dialog_get_content_area (GTK_DIALOG (dialog));
+-	gtk_widget_reparent (dialog->toplevel, content_area);
++	scrolled_window = gtk_scrolled_window_new (NULL, NULL);
++	server_list = gtk_tree_view_new ();
++	server_store = gtk_list_store_new (2, G_TYPE_STRING, G_TYPE_POINTER);
+ 
+-	g_signal_connect (G_OBJECT (dialog->server_list), "row-activated", G_CALLBACK (row_activated), dialog);
++	gtk_tree_view_set_headers_visible (GTK_TREE_VIEW (server_list), FALSE);
++	gtk_tree_view_set_model           (GTK_TREE_VIEW (server_list), GTK_TREE_MODEL (server_store));
+ 
+-	g_signal_connect (
+-		G_OBJECT (gtk_tree_view_get_selection (GTK_TREE_VIEW (dialog->server_list))),
+-		"changed",
+-		G_CALLBACK (selection_changed),
+-		dialog);
++	{
++		GtkCellRenderer *renderer = gtk_cell_renderer_text_new ();
++		GtkTreeViewColumn *column = gtk_tree_view_column_new_with_attributes ("name", renderer, "text", 0, NULL);
++		gtk_tree_view_append_column (GTK_TREE_VIEW (server_list), column);
++	}
+ 
+ 	for (GSList *netlist = network_list; netlist; netlist = g_slist_next (netlist)) {
+ 		GtkTreeIter iter;
+-
+ 		ircnet *net = netlist->data;
+-		gtk_list_store_append (dialog->server_store, &iter);
+-		gtk_list_store_set (dialog->server_store, &iter, 0, net->name, 1, net, -1);
++
++		/* Add only if it has at least 1 server */
++		if (net->servlist) 
++		{
++			gtk_list_store_append (server_store, &iter);
++			gtk_list_store_set (server_store, &iter, 0, net->name, 1, net, -1);
++		}
+ 	}
+ 
++	dialog = gtk_dialog_new_with_buttons (
++		_("Connect"),
++		NULL,
++		GTK_DIALOG_MODAL | GTK_DIALOG_DESTROY_WITH_PARENT,
++		GTK_STOCK_CONNECT, GTK_RESPONSE_OK,
++		GTK_STOCK_CLOSE,   GTK_RESPONSE_CLOSE,
++		NULL);
++
++	content_area = gtk_dialog_get_content_area (GTK_DIALOG (dialog));
++
++	/* Take the full space */
++	gtk_widget_set_vexpand (scrolled_window, TRUE);
++	/* Thicker is better */
++	gtk_container_set_border_width (GTK_CONTAINER (scrolled_window), 12);
++	/* The border makes it neater */
++	gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (scrolled_window), GTK_SHADOW_IN);
++
++	g_signal_connect (G_OBJECT (server_list), "row-activated", G_CALLBACK (connekt_dialog_row_activated), dialog);
++
++	gtk_container_add (GTK_CONTAINER (scrolled_window), server_list);
++	gtk_container_add (GTK_CONTAINER (content_area), scrolled_window);
++
+ 	gtk_window_set_default_size (GTK_WINDOW (dialog), 320, 240);
+-	gtk_window_set_modal (GTK_WINDOW (dialog), TRUE);
+-	gtk_window_set_title (GTK_WINDOW (dialog), _("Connect"));
+-	gtk_dialog_set_response_sensitive (GTK_DIALOG (dialog), GTK_RESPONSE_OK, FALSE);
+-	g_signal_connect (G_OBJECT (dialog), "response", G_CALLBACK (dialog_response), NULL);
+-	g_signal_connect (G_OBJECT (dialog), "key-press-event", G_CALLBACK (dialog_escape_key_handler_destroy), NULL);
+-}
+ 
+-GType
+-connect_dialog_get_type (void)
+-{
+-	static GType connect_dialog_type = 0;
+-	if (!connect_dialog_type) {
+-		static const GTypeInfo connect_dialog_info = {
+-			sizeof (ConnectDialogClass),
+-			NULL, NULL,
+-			(GClassInitFunc) connect_dialog_class_init,
+-			NULL, NULL,
+-			sizeof (ConnectDialog),
+-			0,
+-			(GInstanceInitFunc) connect_dialog_init,
+-		};
+-		connect_dialog_type = g_type_register_static (GTK_TYPE_DIALOG, "ConnectDialog", &connect_dialog_info, 0);
++	gtk_widget_show_all (dialog);
+ 
+-		parent_class = g_type_class_ref (GTK_TYPE_DIALOG);
++	if (gtk_dialog_run (GTK_DIALOG (dialog)) == GTK_RESPONSE_OK)
++	{
++		connekt_dialog_try_connecting (server_list);
+ 	}
+ 
+-	return connect_dialog_type;
+-}
+-
+-ConnectDialog *
+-connect_dialog_new (void)
+-{
+-	return g_object_new (CONNECT_DIALOG_TYPE, 0);
++	gtk_widget_destroy (dialog);
+ }
+Index: xchat-gnome-0.30.0~git20131003.d20b8d/src/fe-gnome/connect-dialog.h
+===================================================================
+--- xchat-gnome-0.30.0~git20131003.d20b8d.orig/src/fe-gnome/connect-dialog.h	2013-10-26 19:57:37.561541400 +0200
++++ xchat-gnome-0.30.0~git20131003.d20b8d/src/fe-gnome/connect-dialog.h	2013-10-26 19:57:37.537542358 +0200
+@@ -25,34 +25,6 @@
+ #ifndef XCHAT_GNOME_CONNECT_DIALOG_H
+ #define XCHAT_GNOME_CONNECT_DIALOG_H
+ 
+-G_BEGIN_DECLS
+-
+-typedef struct _ConnectDialog      ConnectDialog;
+-typedef struct _ConnectDialogClass ConnectDialogClass;
+-
+-#define CONNECT_DIALOG_TYPE            (connect_dialog_get_type ())
+-#define CONNECT_DIALOG(obj)            (G_TYPE_CHECK_INSTANCE_CAST ((obj), CONNECT_DIALOG_TYPE, ConnectDialog))
+-#define CONNECT_DIALOG_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST ((klass), CONNECT_DIALOG_TYPE, ConnectDialogClass))
+-#define IS_CONNECT_DIALOG(obj)         (G_TYPE_CHECK_INSTANCE_TYPE ((obj), CONNECT_DIALOG_TYPE))
+-#define IS_CONNECT_DIALOG_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), CONNECT_DIALOG_TYPE))
+-
+-struct _ConnectDialog
+-{
+-	GtkDialog parent;
+-
+-	GtkWidget *toplevel;
+-	GtkWidget *server_list;
+-	GtkListStore *server_store;
+-};
+-
+-struct _ConnectDialogClass
+-{
+-	GtkDialogClass parent_class;
+-};
+-
+-GType          connect_dialog_get_type (void) G_GNUC_CONST;
+-ConnectDialog *connect_dialog_new (void);
+-
+-G_END_DECLS
++void connekt_dialog ();
+ 
+ #endif
+Index: xchat-gnome-0.30.0~git20131003.d20b8d/src/fe-gnome/fe-gnome.c
+===================================================================
+--- xchat-gnome-0.30.0~git20131003.d20b8d.orig/src/fe-gnome/fe-gnome.c	2013-10-26 19:57:37.561541400 +0200
++++ xchat-gnome-0.30.0~git20131003.d20b8d/src/fe-gnome/fe-gnome.c	2013-10-26 19:57:37.537542358 +0200
+@@ -195,10 +195,7 @@ fe_init (void)
+ 	arg_skip_plugins = 1;
+ 
+ 	if (not_autoconnect ()) {
+-		ConnectDialog *cd;
+-
+-		cd = connect_dialog_new ();
+-		gtk_widget_show_all (GTK_WIDGET (cd));
++		connekt_dialog ();
+ 	}
+ 
+ #ifdef USE_PLUGIN
+Index: xchat-gnome-0.30.0~git20131003.d20b8d/src/fe-gnome/main-window.c
+===================================================================
+--- xchat-gnome-0.30.0~git20131003.d20b8d.orig/src/fe-gnome/main-window.c	2013-10-26 19:57:37.561541400 +0200
++++ xchat-gnome-0.30.0~git20131003.d20b8d/src/fe-gnome/main-window.c	2013-10-26 19:57:37.537542358 +0200
+@@ -331,8 +331,7 @@ static void on_add_widget (GtkUIManager
+ static void
+ on_irc_connect_activate (GtkAction *action, gpointer data)
+ {
+-	ConnectDialog *dialog = connect_dialog_new ();
+-	gtk_widget_show_all (GTK_WIDGET (dialog));
++	connekt_dialog ();
+ }
+ 
+ void
+Index: xchat-gnome-0.30.0~git20131003.d20b8d/src/fe-gnome/preferences-dialog.c
+===================================================================
+--- xchat-gnome-0.30.0~git20131003.d20b8d.orig/src/fe-gnome/preferences-dialog.c	2013-10-26 19:57:37.561541400 +0200
++++ xchat-gnome-0.30.0~git20131003.d20b8d/src/fe-gnome/preferences-dialog.c	2013-10-26 19:57:37.537542358 +0200
+@@ -57,11 +57,6 @@ preferences_dialog_dispose (GObject *obj
+ 		p->colors_page = NULL;
+ 	}
+ 
+-	if (p->effects_page) {
+-		g_object_unref (p->effects_page);
+-		p->effects_page = NULL;
+-	}
+-
+ 	if (p->dcc_page) {
+ 		g_object_unref (p->dcc_page);
+ 		p->dcc_page = NULL;
+@@ -238,7 +233,6 @@ preferences_dialog_init (PreferencesDial
+ 	p->irc_page      = preferences_page_irc_new      (p, xml);
+ 	p->spellcheck_page= preferences_page_spellcheck_new (p,xml);
+ 	p->colors_page   = preferences_page_colors_new   (p, xml);
+-	p->effects_page  = preferences_page_effects_new  (p, xml);
+ 	p->dcc_page      = preferences_page_dcc_new      (p, xml);
+ 	p->networks_page = preferences_page_networks_new (p, xml);
+ #ifdef USE_PLUGIN
+Index: xchat-gnome-0.30.0~git20131003.d20b8d/src/fe-gnome/preferences-dialog.h
+===================================================================
+--- xchat-gnome-0.30.0~git20131003.d20b8d.orig/src/fe-gnome/preferences-dialog.h	2013-10-26 19:57:37.561541400 +0200
++++ xchat-gnome-0.30.0~git20131003.d20b8d/src/fe-gnome/preferences-dialog.h	2013-10-26 19:57:37.541542202 +0200
+@@ -23,7 +23,6 @@
+ #include "gui.h"
+ #include "preferences-page-irc.h"
+ #include "preferences-page-colors.h"
+-#include "preferences-page-effects.h"
+ #include "preferences-page-dcc.h"
+ #include "preferences-page-networks.h"
+ #include "preferences-page-plugins.h"
+@@ -56,7 +55,6 @@ struct _PreferencesDialog
+ 
+ 	PreferencesPageIrc        *irc_page;
+ 	PreferencesPageColors     *colors_page;
+-	PreferencesPageEffects    *effects_page;
+ 	PreferencesPageDCC        *dcc_page;
+ 	PreferencesPageNetworks   *networks_page;
+ 	PreferencesPagePlugins    *plugins_page;

Modified: packages/unstable/xchat-gnome/debian/patches/series
URL: http://svn.debian.org/wsvn/pkg-gnome/packages/unstable/xchat-gnome/debian/patches/series?rev=40120&op=diff
==============================================================================
--- packages/unstable/xchat-gnome/debian/patches/series	[utf-8] (original)
+++ packages/unstable/xchat-gnome/debian/patches/series	[utf-8] Sat Oct 26 18:57:53 2013
@@ -1,2 +1,3 @@
+01_finish_gtk3_port.patch
 120-fix-clipboard-segfault.patch
 define_functions_fix_build.patch




More information about the pkg-gnome-commits mailing list