diff -u xchat-gnome-0.18/debian/changelog xchat-gnome-0.18/debian/changelog --- xchat-gnome-0.18/debian/changelog +++ xchat-gnome-0.18/debian/changelog @@ -1,3 +1,10 @@ +xchat-gnome (1:0.18-2ubuntu2) hardy; urgency=low + + * debian/patches/10_user_list_in_main_window_option.patch: + - Option to show the user list in the main window. + + -- Matvey Kozhev Wed, 09 Jan 2008 22:35:50 +0600 + xchat-gnome (1:0.18-2ubuntu1) hardy; urgency=low * Sync with Debian only in patch2: unchanged: --- xchat-gnome-0.18.orig/debian/patches/10_user_list_in_main_window_option.patch +++ xchat-gnome-0.18/debian/patches/10_user_list_in_main_window_option.patch @@ -0,0 +1,245 @@ +diff -urN xchat-gnome-0.18~/data/preferences-dialog.glade xchat-gnome-0.18/data/preferences-dialog.glade +--- xchat-gnome-0.18~/data/preferences-dialog.glade 2007-03-07 04:44:56.000000000 +0600 ++++ xchat-gnome-0.18/data/preferences-dialog.glade 2008-01-09 22:33:37.000000000 +0600 +@@ -818,6 +818,25 @@ + False + + ++ ++ ++ True ++ Show user list in main window ++ True ++ Show _user list in main window ++ True ++ GTK_RELIEF_NORMAL ++ True ++ False ++ False ++ True ++ ++ ++ 0 ++ False ++ False ++ ++ + + + 0 +diff -urN xchat-gnome-0.18~/data/xchat-gnome.glade xchat-gnome-0.18/data/xchat-gnome.glade +--- xchat-gnome-0.18~/data/xchat-gnome.glade 2007-07-08 03:43:27.000000000 +0700 ++++ xchat-gnome-0.18/data/xchat-gnome.glade 2008-01-09 22:33:24.000000000 +0600 +@@ -245,6 +245,11 @@ + + + ++ ++ True ++ True ++ ++ + + True + 6 +@@ -328,6 +334,35 @@ + + + ++ ++ True ++ True ++ ++ ++ ++ ++ ++ True ++ True ++ GTK_POLICY_AUTOMATIC ++ GTK_POLICY_AUTOMATIC ++ GTK_SHADOW_IN ++ GTK_CORNER_TOP_LEFT ++ ++ ++ ++ ++ ++ ++ True ++ True ++ ++ ++ ++ ++ True ++ True ++ + + + +diff -urN xchat-gnome-0.18~/src/fe-gnome/apps_xchat.schemas.in xchat-gnome-0.18/src/fe-gnome/apps_xchat.schemas.in +--- xchat-gnome-0.18~/src/fe-gnome/apps_xchat.schemas.in 2007-03-07 04:47:37.000000000 +0600 ++++ xchat-gnome-0.18/src/fe-gnome/apps_xchat.schemas.in 2008-01-09 21:33:08.000000000 +0600 +@@ -232,6 +232,17 @@ + + + ++ /schemas/apps/xchat/main_window/userlist_in_main_window ++ /apps/xchat/main_window/userlist_in_main_window ++ xchat ++ bool ++ false ++ ++ Show user list in main window ++ ++ ++ ++ + /schemas/apps/xchat/channel_list/width + /apps/xchat/channel_list/width + xchat +diff -urN xchat-gnome-0.18~/src/fe-gnome/main-window.c xchat-gnome-0.18/src/fe-gnome/main-window.c +--- xchat-gnome-0.18~/src/fe-gnome/main-window.c 2007-03-19 05:57:06.000000000 +0600 ++++ xchat-gnome-0.18/src/fe-gnome/main-window.c 2008-01-09 21:59:51.000000000 +0600 +@@ -87,6 +87,8 @@ + + static void nickname_style_set (GtkWidget *button, GtkStyle *previous_style, gpointer data); + ++static void main_window_userlist_location_changed (GConfClient *client, guint cnxn_id, GConfEntry *entry, gpointer user_data); ++ + static GtkActionEntry action_entries [] = { + + /* Toplevel */ +@@ -136,6 +138,7 @@ + GtkWidget *close, *menu_vbox, *widget; + GtkSizeGroup *group; + GtkAction *action; ++ GConfClient *client; + + gui.main_window = glade_xml_get_widget (gui.xml, "xchat-gnome"); + g_signal_connect (G_OBJECT (gui.main_window), "delete-event", G_CALLBACK (on_main_window_close), NULL); +@@ -214,6 +217,15 @@ + gtk_button_set_use_underline (GTK_BUTTON (gui.nick_button), FALSE); + g_signal_connect (G_OBJECT (gui.nick_button), "clicked", G_CALLBACK (on_nickname_clicked), NULL); + g_signal_connect (G_OBJECT (GTK_BIN (gui.nick_button)->child), "style-set", G_CALLBACK (nickname_style_set), NULL); ++ ++ client = gconf_client_get_default (); ++ ++ /* move userlist to main window if applicable */ ++ main_window_set_show_userlist (gconf_client_get_bool (client, "/apps/xchat/main_window/userlist_in_main_window", NULL)); ++ ++ gconf_client_notify_add (client, "/apps/xchat/main_window/userlist_in_main_window", (GConfClientNotifyFunc) main_window_userlist_location_changed, NULL, NULL, NULL); ++ ++ g_object_unref (client); + } + + void +@@ -673,3 +685,27 @@ + + set_nickname_color (gui.current_session->server); + } ++ ++static void ++main_window_userlist_location_changed (GConfClient *client, guint cnxn_id, GConfEntry *entry, gpointer user_data) ++{ ++ GConfValue *value = gconf_entry_get_value (entry); ++ main_window_set_show_userlist (gconf_value_get_bool (value)); ++} ++ ++void ++main_window_set_show_userlist (gboolean show_in_main_window) ++{ ++ if (show_in_main_window) ++ { ++ gtk_widget_hide (gui.userlist_toggle); ++ gtk_widget_show (glade_xml_get_widget (gui.xml, "scrolledwindow_userlist_main")); ++ gtk_widget_reparent (GTK_WIDGET (gui.userlist), glade_xml_get_widget (gui.xml, "scrolledwindow_userlist_main")); ++ } ++ else ++ { ++ gtk_widget_show (gui.userlist_toggle); ++ gtk_widget_hide (glade_xml_get_widget (gui.xml, "scrolledwindow_userlist_main")); ++ gtk_widget_reparent (GTK_WIDGET (gui.userlist), glade_xml_get_widget (gui.xml, "scrolledwindow_userlist")); ++ } ++} +diff -urN xchat-gnome-0.18~/src/fe-gnome/main-window.h xchat-gnome-0.18/src/fe-gnome/main-window.h +--- xchat-gnome-0.18~/src/fe-gnome/main-window.h 2007-03-07 04:47:37.000000000 +0600 ++++ xchat-gnome-0.18/src/fe-gnome/main-window.h 2008-01-09 21:59:25.000000000 +0600 +@@ -30,5 +30,6 @@ + void rename_main_window (gchar *server, gchar *channel); + void set_nickname_label (struct server *serv, char *newnick); + void set_nickname_color (struct server *serv); ++void main_window_set_show_userlist (gboolean show_in_main_window); + + #endif +diff -urN xchat-gnome-0.18~/src/fe-gnome/preferences-page-irc.c xchat-gnome-0.18/src/fe-gnome/preferences-page-irc.c +--- xchat-gnome-0.18~/src/fe-gnome/preferences-page-irc.c 2007-03-07 04:47:37.000000000 +0600 ++++ xchat-gnome-0.18/src/fe-gnome/preferences-page-irc.c 2008-01-09 22:06:12.000000000 +0600 +@@ -30,6 +30,7 @@ + #include "preferences-dialog.h" + #include "util.h" + #include "conversation-panel.h" ++#include "main-window.h" + + G_DEFINE_TYPE(PreferencesPageIrc, preferences_page_irc, PREFERENCES_PAGE_TYPE) + +@@ -265,6 +266,19 @@ + } + } + ++static void ++userlist_main_changed (GtkToggleButton *button, gpointer data) ++{ ++ gboolean active; ++ GConfClient *client = gconf_client_get_default (); ++ ++ active = gtk_toggle_button_get_active (button); ++ main_window_set_show_userlist (active); ++ ++ gconf_client_set_bool (client, "/apps/xchat/main_window/userlist_in_main_window", active, NULL); ++ g_object_unref (client); ++} ++ + PreferencesPageIrc* + preferences_page_irc_new (gpointer prefs_dialog, GladeXML *xml) + { +@@ -297,6 +311,7 @@ + GW(auto_logging); + GW(show_timestamps); + GW(show_marker); ++ GW(userlist_main); + #undef GW + + GtkIconTheme *theme = gtk_icon_theme_get_default (); +@@ -316,6 +331,7 @@ + g_signal_connect (G_OBJECT (page->show_timestamps), "toggled", G_CALLBACK (bool_changed), "/apps/xchat/irc/showtimestamps"); + g_signal_connect (G_OBJECT (page->auto_logging), "toggled", G_CALLBACK (auto_logging_changed), NULL); + g_signal_connect (G_OBJECT (page->show_marker), "toggled", G_CALLBACK (show_marker_changed), NULL); ++ g_signal_connect (G_OBJECT (page->userlist_main), "toggled", G_CALLBACK (userlist_main_changed), NULL); + g_signal_connect (G_OBJECT (page->highlight_add), "clicked", G_CALLBACK (highlight_add), page); + g_signal_connect (G_OBJECT (page->highlight_edit), "clicked", G_CALLBACK (highlight_edit), page); + g_signal_connect (G_OBJECT (page->highlight_remove), "clicked", G_CALLBACK (highlight_remove), page); +@@ -385,7 +401,10 @@ + toggle = gconf_client_get_bool (p->gconf, "/apps/xchat/irc/showtimestamps", NULL); + gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (page->show_timestamps), toggle); + +- gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (page->auto_logging), prefs.logging); ++ toggle = gconf_client_get_bool (p->gconf, "/apps/xchat/main_window/userlist_in_main_window", NULL); ++ gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (page->userlist_main), toggle); ++ ++ gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (page->auto_logging), prefs.logging); + gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (page->show_marker), prefs.show_marker); + /* highlight list */ + page->highlight_store = gtk_list_store_new (1, G_TYPE_STRING); +diff -urN xchat-gnome-0.18~/src/fe-gnome/preferences-page-irc.h xchat-gnome-0.18/src/fe-gnome/preferences-page-irc.h +--- xchat-gnome-0.18~/src/fe-gnome/preferences-page-irc.h 2007-03-07 04:47:37.000000000 +0600 ++++ xchat-gnome-0.18/src/fe-gnome/preferences-page-irc.h 2008-01-09 21:40:42.000000000 +0600 +@@ -58,6 +58,7 @@ + GtkWidget *auto_logging; + GtkWidget *show_timestamps; + GtkWidget *show_marker; ++ GtkWidget *userlist_main; + + GtkListStore *highlight_store; + GtkTreeViewColumn *highlight_column;