diff-topiclabelinsteadofentry.txt

diff file - palango -, 09/04/2008 01:45 PM

Download (4.9 KB)

 
1
Index: src/Frontend-GNOME/Chats/GroupChatView.cs
2
===================================================================
3
--- src/Frontend-GNOME/Chats/GroupChatView.cs	(Revision 417)
4
+++ src/Frontend-GNOME/Chats/GroupChatView.cs	(Arbeitskopie)
5
@@ -49,13 +49,13 @@
6
         private Gtk.VBox           _OutputVBox;
7
         private Gtk.Frame          _PersonTreeViewFrame;
8
         private Gtk.HPaned         _OutputHPaned;
9
-        private Gtk.Entry          _TopicEntry;
10
+        private Gtk.Label          _TopicLabel;
11
         private Gtk.TreeViewColumn _IdentityNameColumn;
12
         private Gtk.Image          _TabImage;
13
         
14
-        public Gtk.Entry TopicEntry {
15
+        public Gtk.Label TopicLabel {
16
             get {
17
-                return _TopicEntry;
18
+                return _TopicLabel;
19
             }
20
         }
21
         
22
@@ -142,8 +142,8 @@
23
             // topic
24
             _OutputVBox = new Gtk.VBox();
25
             
26
-            _TopicEntry = new Gtk.Entry();
27
-            _TopicEntry.IsEditable = false;
28
+            _TopicLabel = new Gtk.Label();
29
+            _TopicLabel.UseMarkup = true;
30
             
31
             Add(_OutputHPaned);
32
             
33
@@ -170,7 +170,7 @@
34
             
35
             base.Disable();
36
             
37
-            _TopicEntry.Text = String.Empty;
38
+            _TopicLabel.Markup = String.Empty;
39
             _PersonListStore.Clear();
40
             UpdatePersonCount();
41
         }
42
@@ -258,9 +258,9 @@
43
 #endif
44
             // sync topic
45
             string topic = _GroupChatModel.Topic;
46
-            if ((_TopicEntry != null) &&
47
+            if ((_TopicLabel != null) &&
48
                (topic != null)) {
49
-                _TopicEntry.Text = topic;
50
+                _TopicLabel.Markup = String.Format("<big>{0}</big>", topic);
51
             }
52
             
53
             base.Sync();
54
@@ -354,37 +354,37 @@
55
             
56
             if (BackgroundColor != null) {
57
                 _PersonTreeView.ModifyBase(Gtk.StateType.Normal, BackgroundColor.Value);
58
-                _TopicEntry.ModifyBase(Gtk.StateType.Normal, BackgroundColor.Value);
59
+                _TopicLabel.ModifyBase(Gtk.StateType.Normal, BackgroundColor.Value);
60
             } else {
61
                 _PersonTreeView.ModifyBase(Gtk.StateType.Normal);
62
-                _TopicEntry.ModifyBase(Gtk.StateType.Normal);
63
+                _TopicLabel.ModifyBase(Gtk.StateType.Normal);
64
             }
65
             
66
             if (ForegroundColor != null) {
67
                 _PersonTreeView.ModifyText(Gtk.StateType.Normal, ForegroundColor.Value);
68
-                _TopicEntry.ModifyText(Gtk.StateType.Normal, ForegroundColor.Value);
69
+                _TopicLabel.ModifyText(Gtk.StateType.Normal, ForegroundColor.Value);
70
             } else {
71
                 _PersonTreeView.ModifyText(Gtk.StateType.Normal);
72
-                _TopicEntry.ModifyText(Gtk.StateType.Normal);
73
+                _TopicLabel.ModifyText(Gtk.StateType.Normal);
74
             }
75
             
76
             _PersonTreeView.ModifyFont(FontDescription);
77
-            _TopicEntry.ModifyFont(FontDescription);
78
+            _TopicLabel.ModifyFont(FontDescription);
79
             
80
             // topic
81
             string topic_pos = (string) config["Interface/Notebook/Channel/TopicPosition"];
82
-            if (_TopicEntry.IsAncestor(_OutputVBox)) {
83
-                _OutputVBox.Remove(_TopicEntry);
84
+            if (_TopicLabel.IsAncestor(_OutputVBox)) {
85
+                _OutputVBox.Remove(_TopicLabel);
86
             }
87
             if (OutputScrolledWindow.IsAncestor(_OutputVBox)) {
88
                 _OutputVBox.Remove(OutputScrolledWindow);
89
             }
90
             if (topic_pos == "top") {
91
-                _OutputVBox.PackStart(_TopicEntry, false, false, 2);
92
+                _OutputVBox.PackStart(_TopicLabel, false, false, 2);
93
                 _OutputVBox.PackStart(OutputScrolledWindow, true, true, 0);
94
             } else if  (topic_pos == "bottom") {
95
                 _OutputVBox.PackStart(OutputScrolledWindow, true, true, 0);
96
-                _OutputVBox.PackStart(_TopicEntry, false, false, 2);
97
+                _OutputVBox.PackStart(_TopicLabel, false, false, 2);
98
             } else if (topic_pos == "none") {
99
                 _OutputVBox.PackStart(OutputScrolledWindow, true, true, 0);
100
             } else {
101
Index: src/Frontend-GNOME/GnomeUI.cs
102
===================================================================
103
--- src/Frontend-GNOME/GnomeUI.cs	(Revision 417)
104
+++ src/Frontend-GNOME/GnomeUI.cs	(Arbeitskopie)
105
@@ -209,8 +209,8 @@
106
                 TraceRemotingCall(mb, ecpage, topic);
107
                 
108
                 GroupChatView cpage = (GroupChatView)Frontend.MainWindow.Notebook.GetChat(ecpage);
109
-                if (cpage.TopicEntry != null) {
110
-                    cpage.TopicEntry.Text = topic;
111
+                if (cpage.TopicLabel != null) {
112
+                    cpage.TopicLabel.Markup = String.Format("<big>{0}</big>", topic);
113
                 }
114
             });
115
         }