[xchat-gnome] Bug 656069 - connect & dcc windows show empty contents (no server and transfer lists)
- From: Ritesh Khadgaray <rkhadgaray src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [xchat-gnome] Bug 656069 - connect & dcc windows show empty contents (no server and transfer lists)
- Date: Sat, 6 Aug 2011 16:58:34 +0000 (UTC)
commit 8f00ec61d7638f8af5f8d90df154c82bb3725c92
Author: Theppitak Karoonboonyanan <thep linux thai net>
Date: Sat Aug 6 18:56:51 2011 +0200
Bug 656069 - connect & dcc windows show empty contents (no server and transfer lists)
Additionally, hide dcc file transfer window on startup
data/connect-dialog.glade | 158 ++++-------------------------------------
data/dcc-window.glade | 2 +-
src/fe-gnome/connect-dialog.c | 4 +-
src/fe-gnome/dcc-window.c | 3 +-
4 files changed, 21 insertions(+), 146 deletions(-)
---
diff --git a/data/connect-dialog.glade b/data/connect-dialog.glade
index cdb7f51..69af772 100644
--- a/data/connect-dialog.glade
+++ b/data/connect-dialog.glade
@@ -1,155 +1,27 @@
-<?xml version="1.0"?>
-<!--*- mode: xml -*-->
+<?xml version="1.0" encoding="UTF-8"?>
<interface>
- <object class="GtkDialog" id="dialog1">
- <property name="border_width">5</property>
- <property name="width_request">320</property>
- <property name="height_request">240</property>
- <property name="title">connect to network</property>
- <property name="type">GTK_WINDOW_TOPLEVEL</property>
- <property name="window_position">GTK_WIN_POS_NONE</property>
- <property name="modal">False</property>
- <property name="resizable">True</property>
- <property name="destroy_with_parent">False</property>
- <property name="decorated">True</property>
- <property name="skip_taskbar_hint">False</property>
- <property name="skip_pager_hint">False</property>
- <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
- <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
- <property name="focus_on_map">True</property>
- <property name="urgency_hint">False</property>
- <property name="has_separator">False</property>
- <child internal-child="vbox">
- <object class="GtkVBox" id="dialog-vbox3">
+ <!-- interface-requires gtk+ 2.12 -->
+ <object class="GtkWindow" id="window1">
+ <property name="can_focus">False</property>
+ <child>
+ <object class="GtkScrolledWindow" id="toplevel">
<property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">2</property>
- <child internal-child="action_area">
- <object class="GtkHButtonBox" id="dialog-action_area3">
- <property name="visible">True</property>
- <property name="layout_style">GTK_BUTTONBOX_END</property>
- <child>
- <object class="GtkButton" id="close server connect">
- <property name="visible">True</property>
- <property name="can_default">True</property>
- <property name="can_focus">True</property>
- <property name="label">gtk-close</property>
- <property name="use_stock">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="focus_on_click">True</property>
- </object>
- </child>
- <child>
- <object class="GtkButton" id="connect to server">
- <property name="visible">True</property>
- <property name="can_default">True</property>
- <property name="can_focus">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="focus_on_click">True</property>
- <child>
- <object class="GtkAlignment" id="alignment3">
- <property name="visible">True</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xscale">0</property>
- <property name="yscale">0</property>
- <property name="top_padding">0</property>
- <property name="bottom_padding">0</property>
- <property name="left_padding">0</property>
- <property name="right_padding">0</property>
- <child>
- <object class="GtkHBox" id="hbox39">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">2</property>
- <child>
- <object class="GtkImage" id="image3">
- <property name="visible">True</property>
- <property name="stock">gtk-ok</property>
- <property name="icon_size">4</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </object>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="label59">
- <property name="visible">True</property>
- <property name="label" translatable="yes">C_onnect</property>
- <property name="use_underline">True</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
- <property name="width_chars">-1</property>
- <property name="single_line_mode">False</property>
- <property name="angle">0</property>
- </object>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
- </object>
- </child>
- </object>
- </child>
- </object>
- </child>
- </object>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="pack_type">GTK_PACK_END</property>
- </packing>
- </child>
+ <property name="can_focus">True</property>
+ <property name="border_width">5</property>
+ <property name="hscrollbar_policy">never</property>
+ <property name="shadow_type">in</property>
<child>
- <object class="GtkScrolledWindow" id="toplevel">
- <property name="border_width">5</property>
+ <object class="GtkTreeView" id="server_list">
<property name="visible">True</property>
<property name="can_focus">True</property>
- <property name="hscrollbar_policy">GTK_POLICY_NEVER</property>
- <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
- <property name="shadow_type">GTK_SHADOW_IN</property>
- <property name="window_placement">GTK_CORNER_TOP_LEFT</property>
- <child>
- <object class="GtkTreeView" id="server_list">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="headers_visible">False</property>
- <property name="rules_hint">True</property>
- <property name="reorderable">False</property>
- <property name="enable_search">True</property>
- <property name="fixed_height_mode">False</property>
- <property name="hover_selection">False</property>
- <property name="hover_expand">False</property>
- </object>
+ <property name="headers_visible">False</property>
+ <property name="rules_hint">True</property>
+ <child internal-child="selection">
+ <object class="GtkTreeSelection" id="treeview-selection"/>
</child>
</object>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
</child>
</object>
</child>
- <action-widgets>
- <action-widget response="-7">close server connect</action-widget>
- <action-widget response="0">connect to server</action-widget>
- </action-widgets>
</object>
</interface>
diff --git a/data/dcc-window.glade b/data/dcc-window.glade
index eb477dd..8f5ad9f 100644
--- a/data/dcc-window.glade
+++ b/data/dcc-window.glade
@@ -3,7 +3,7 @@
<interface>
<object class="GtkWindow" id="window1">
<property name="border_width">12</property>
- <property name="visible">True</property>
+ <property name="visible">False</property>
<property name="title" translatable="yes">File Transfers</property>
<property name="type">GTK_WINDOW_TOPLEVEL</property>
<property name="window_position">GTK_WIN_POS_NONE</property>
diff --git a/src/fe-gnome/connect-dialog.c b/src/fe-gnome/connect-dialog.c
index 796ed22..195a85a 100644
--- a/src/fe-gnome/connect-dialog.c
+++ b/src/fe-gnome/connect-dialog.c
@@ -158,7 +158,9 @@ connect_dialog_init (ConnectDialog *dialog)
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);
- gtk_container_add (GTK_CONTAINER (GTK_DIALOG (dialog)->vbox), dialog->toplevel);
+
+ GtkWidget *content_area = gtk_dialog_get_content_area (GTK_DIALOG (dialog));
+ gtk_widget_reparent (dialog->toplevel, content_area);
g_signal_connect (G_OBJECT (dialog->server_list), "row-activated", G_CALLBACK (row_activated), dialog);
diff --git a/src/fe-gnome/dcc-window.c b/src/fe-gnome/dcc-window.c
index 3a8d0cc..7caf17c 100644
--- a/src/fe-gnome/dcc-window.c
+++ b/src/fe-gnome/dcc-window.c
@@ -110,7 +110,8 @@ dcc_window_init (DccWindow *window)
gtk_tree_view_set_model (GTK_TREE_VIEW (window->transfer_list), GTK_TREE_MODEL (window->transfer_store));
gtk_container_set_border_width (GTK_CONTAINER (window), 12);
- gtk_container_add (GTK_CONTAINER (window), window->toplevel);
+ gtk_widget_reparent (window->toplevel, window);
+
gtk_window_set_default_size (GTK_WINDOW (window), 300, 400);
gtk_window_set_title (GTK_WINDOW (window), _("File Transfers"));
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]