gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] r7081 - in gnunet-gtk: . pixmaps src/plugins/chat


From: gnunet
Subject: [GNUnet-SVN] r7081 - in gnunet-gtk: . pixmaps src/plugins/chat
Date: Sat, 7 Jun 2008 17:31:05 -0600 (MDT)

Author: grothoff
Date: 2008-06-07 17:31:04 -0600 (Sat, 07 Jun 2008)
New Revision: 7081

Added:
   gnunet-gtk/pixmaps/self.png
   gnunet-gtk/pixmaps/self.svg
Modified:
   gnunet-gtk/TODO
   gnunet-gtk/gnunet-gtk.glade
   gnunet-gtk/src/plugins/chat/chat.c
Log:
done

Modified: gnunet-gtk/TODO
===================================================================
--- gnunet-gtk/TODO     2008-06-07 23:30:04 UTC (rev 7080)
+++ gnunet-gtk/TODO     2008-06-07 23:31:04 UTC (rev 7081)
@@ -3,14 +3,6 @@
 Annotations:
   RC == Release Critical
 
-0.8.0 (new core features):
-- chat improvements:
-  * allow leaving chat rooms
-  * allow sending / joining by pressing ENTER
-  * indicate who we are in the member list
-  * add various options for sending messages
-  * indicate how a message was received (private, signed, etc.)
-
 0.8.1 (expand basics):
 - improved search:
   * implement search bookmarking (e.g. user could add/edit/delete
@@ -20,6 +12,8 @@
     pattern that must be matched for the lines to be displayed
     (to further prune search results, for example)
 - improved chat:
+  * add various options for sending messages
+  * indicate how a message was received (private, signed, etc.)
   * allow specifying metadata with nickname
   * show chatroom member metadata (right-click pop-up)
 - unindexing:

Modified: gnunet-gtk/gnunet-gtk.glade
===================================================================
--- gnunet-gtk/gnunet-gtk.glade 2008-06-07 23:30:04 UTC (rev 7080)
+++ gnunet-gtk/gnunet-gtk.glade 2008-06-07 23:31:04 UTC (rev 7081)
@@ -3144,7 +3144,7 @@
                       </packing>
                     </child>
                     <child>
-                      <widget class="GtkButton" id="searchCloseButton">
+                      <widget class="GtkButton" id="searchCloseButtonOnPage">
                         <property name="visible">True</property>
                         <property name="can_focus">True</property>
                         <property name="tooltip" translatable="yes">Close 
search tab (also aborts search)</property>
@@ -3311,6 +3311,8 @@
                     <property name="visible">True</property>
                     <property name="can_focus">True</property>
                     <property name="events">GDK_POINTER_MOTION_MASK | 
GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | 
GDK_BUTTON_RELEASE_MASK</property>
+                    <signal name="activate" 
handler="on_chat_frame_send_button_click_event_"/>
+                    <accelerator key="Return" modifiers="" signal="activate"/>
                   </widget>
                   <packing>
                     <property name="padding">5</property>
@@ -3324,8 +3326,8 @@
                     <property name="has_default">True</property>
                     <property name="tooltip" translatable="yes">Broadcast the 
message to all participants in the current chat room</property>
                     <property name="response_id">0</property>
-                    <signal name="clicked" 
handler="on_chat_frame_send_button_click_event_"/>
-                    <accelerator key="Return" modifiers="GDK_CONTROL_MASK" 
signal="activate"/>
+                    <signal name="activate" 
handler="on_chat_frame_send_button_click_event_"/>
+                    <accelerator key="Return" modifiers="" signal="activate"/>
                     <child>
                       <widget class="GtkAlignment" id="alignment6">
                         <property name="visible">True</property>
@@ -3348,8 +3350,7 @@
                             <child>
                               <widget class="GtkLabel" id="label69">
                                 <property name="visible">True</property>
-                                <property name="label" 
translatable="yes">Sen_d</property>
-                                <property name="use_underline">True</property>
+                                <property name="label" 
translatable="yes">Send</property>
                               </widget>
                               <packing>
                                 <property name="expand">False</property>
@@ -3380,6 +3381,16 @@
           </widget>
         </child>
         <child>
+          <widget class="GtkVSeparator" id="vseparator2">
+            <property name="visible">True</property>
+          </widget>
+          <packing>
+            <property name="expand">False</property>
+            <property name="padding">2</property>
+            <property name="position">1</property>
+          </packing>
+        </child>
+        <child>
           <widget class="GtkScrolledWindow" id="chatScroll">
             <property name="visible">True</property>
             <property name="can_focus">True</property>
@@ -3389,16 +3400,18 @@
             <property name="shadow_type">GTK_SHADOW_IN</property>
             <child>
               <widget class="GtkTreeView" id="roomMembersTreeView">
+                <property name="width_request">200</property>
                 <property name="visible">True</property>
                 <property name="can_focus">True</property>
                 <property name="headers_clickable">True</property>
+                <property name="rules_hint">True</property>
               </widget>
             </child>
           </widget>
           <packing>
             <property name="expand">False</property>
             <property name="fill">False</property>
-            <property name="position">1</property>
+            <property name="position">2</property>
           </packing>
         </child>
       </widget>
@@ -4363,7 +4376,7 @@
                 <property name="label">gtk-cancel</property>
                 <property name="use_stock">True</property>
                 <property name="response_id">-6</property>
-                <accelerator key="Escape" modifiers="GDK_MOD1_MASK" 
signal="activate"/>
+                <accelerator key="Escape" modifiers="" signal="activate"/>
               </widget>
             </child>
             <child>
@@ -4855,7 +4868,7 @@
           </packing>
         </child>
         <child>
-          <widget class="GtkButton" id="searchCloseButton1">
+          <widget class="GtkButton" id="searchCloseButton">
             <property name="visible">True</property>
             <property name="tooltip" translatable="yes">Stop the search and 
close the tab</property>
             <property name="relief">GTK_RELIEF_NONE</property>
@@ -4928,4 +4941,48 @@
       </widget>
     </child>
   </widget>
+  <widget class="GtkWindow" id="chatTabLabelWindow">
+    <property name="visible">True</property>
+    <property name="title" translatable="yes">Chat Tab Label with Close 
Button</property>
+    <child>
+      <widget class="GtkHBox" id="chatTabHBox">
+        <property name="visible">True</property>
+        <child>
+          <widget class="GtkLabel" id="chatTabLabel">
+            <property name="visible">True</property>
+            <property name="xpad">5</property>
+            <property name="label" translatable="yes">FIXME</property>
+            <property name="use_underline">True</property>
+            <property name="mnemonic_widget">chatCloseButton</property>
+            <property name="single_line_mode">True</property>
+          </widget>
+          <packing>
+            <property name="expand">False</property>
+            <property name="fill">False</property>
+          </packing>
+        </child>
+        <child>
+          <widget class="GtkButton" id="chatCloseButton">
+            <property name="visible">True</property>
+            <property name="tooltip" translatable="yes">Leave the chat room 
and close the tab</property>
+            <property name="relief">GTK_RELIEF_NONE</property>
+            <property name="response_id">0</property>
+            <signal name="clicked" handler="on_closeChatButton_clicked_" 
object="chatTabHBox"/>
+            <child>
+              <widget class="GtkImage" id="image9">
+                <property name="visible">True</property>
+                <property name="stock">gtk-cancel</property>
+                <property name="icon_size">1</property>
+              </widget>
+            </child>
+          </widget>
+          <packing>
+            <property name="expand">False</property>
+            <property name="fill">False</property>
+            <property name="position">1</property>
+          </packing>
+        </child>
+      </widget>
+    </child>
+  </widget>
 </glade-interface>

Added: gnunet-gtk/pixmaps/self.png
===================================================================
(Binary files differ)


Property changes on: gnunet-gtk/pixmaps/self.png
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: gnunet-gtk/pixmaps/self.svg
===================================================================
--- gnunet-gtk/pixmaps/self.svg                         (rev 0)
+++ gnunet-gtk/pixmaps/self.svg 2008-06-07 23:31:04 UTC (rev 7081)
@@ -0,0 +1,172 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+<svg
+   xmlns:svg="http://www.w3.org/2000/svg";
+   xmlns="http://www.w3.org/2000/svg";
+   version="1.0"
+   width="400"
+   height="400"
+   id="svg24159">
+  <defs
+     id="defs24161" />
+  <g
+     id="layer1">
+    <g
+       transform="matrix(0.651999,0,0,0.651999,-51.23088,-96.82474)"
+       id="g879">
+      <g
+         transform="translate(87.13029,195.4545)"
+         
style="font-size:12px;fill:#000000;fill-opacity:1;stroke:#000000;stroke-opacity:0.99122799"
+         id="g670">
+        <path
+           d="M 294.895,259.711 C 285.199,267.084 283.042,269.56 
277.684,277.719 C 275.745,280.868 272.124,288.227 271.134,293.164 C 
270.145,298.1 269.404,305.262 269.407,309.055 C 269.419,321.908 273.51,329.971 
277.978,329.69 C 281.97,329.232 287.05,325.069 294.748,315.614"
+           
style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1pt;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:0.99122799"
+           id="path584" />
+        <path
+           d="M 294.895,259.711 C 285.199,267.084 283.042,269.56 
277.684,277.719 C 275.745,280.868 272.124,288.227 271.134,293.164 C 
270.145,298.1 269.404,305.262 269.407,309.055 C 269.419,321.908 273.51,329.971 
277.978,329.69 C 281.97,329.232 287.05,325.069 294.748,315.614"
+           transform="matrix(-1,0,0,1,596.772,0.208099)"
+           
style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1pt;stroke-linecap:butt;stroke-linejoin:bevel;stroke-opacity:0.99122799"
+           id="path585" />
+        <path
+           d="M 211.888,203.561 C 225.348,201.202 238.391,199.676 
251.851,198.15 C 269.474,193.709 278.355,213.83 273.498,228.955 C 
267.393,242.415 258.79,254.21 248.938,265.588 C 241.306,274.191 232.214,275.583 
223.544,272.664 C 216.546,270.724 210.083,266.421 203.145,256.43 C 
200.093,247.826 197.457,243.385 193.571,232.701 C 190.519,222.849 
195.266,208.101 211.888,203.561 z "
+           transform="translate(0.588722,-3.051758e-5)"
+           
style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1pt;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:0.99122799"
+           id="path586" />
+        <path
+           d="M 211.888,203.561 C 225.348,201.202 238.391,199.676 
251.851,198.15 C 269.474,193.709 278.355,213.83 273.498,228.955 C 
267.393,242.415 258.79,254.21 248.938,265.588 C 241.306,274.191 232.214,275.583 
223.544,272.664 C 216.546,270.724 210.083,266.421 203.145,256.43 C 
200.093,247.826 197.457,243.385 193.571,232.701 C 190.519,222.849 
195.266,208.101 211.888,203.561 z "
+           transform="matrix(-1,0,0,1,596.4468,-3.051758e-5)"
+           
style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1pt;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:0.99122799"
+           id="path587" />
+      </g>
+      <g
+         transform="translate(87.13029,195.4545)"
+         style="font-size:12px;stroke:#000000;stroke-opacity:0.99122799"
+         id="g775">
+        <g
+           
style="fill:none;fill-opacity:1;stroke:#000000;stroke-opacity:0.99122799"
+           id="g740">
+          <g
+             
style="font-size:12px;fill:none;fill-opacity:1;stroke:#000000;stroke-opacity:0.99122799"
+             id="g652">
+            <path
+               d="M 212.232,318.53 C 217.922,331.874 219.682,336.945 
223.785,350.248 C 227.281,362.537 228.566,370.042 230.726,387.506"
+               
style="fill:none;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:6.25;stroke-linecap:butt;stroke-linejoin:miter;stroke-dasharray:none;stroke-opacity:0.99122799"
+               id="path611" />
+            <path
+               d="M 212.232,318.53 C 217.922,331.874 219.682,336.945 
223.785,350.248 C 227.281,362.537 228.566,370.042 230.726,387.506"
+               transform="matrix(-1,0,0,1,596.3183,-0.735886)"
+               
style="fill:none;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:6.25;stroke-linecap:butt;stroke-linejoin:miter;stroke-dasharray:none;stroke-opacity:0.99122799"
+               id="path612" />
+            <g
+               
style="fill:none;fill-opacity:1;stroke:#000000;stroke-opacity:0.99122799"
+               id="g637">
+              <path
+                 d="M 236.516,349.732 C 251.234,358.759 276.677,360.151 
299.472,359.741 C 324.866,359.612 346.605,357.778 360.881,349.144"
+                 
style="fill:none;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:5;stroke-linecap:butt;stroke-linejoin:miter;stroke-dasharray:none;stroke-opacity:0.99122799"
+                 id="path588" />
+              <path
+                 d="M 241.667,373.282 C 257.905,383.486 277.001,386.99 
298.993,386.16 C 321.835,385.604 339.344,383.682 354.994,372.988"
+                 
style="fill:none;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:5;stroke-linecap:butt;stroke-linejoin:miter;stroke-dasharray:none;stroke-opacity:0.99122799"
+                 id="path608" />
+              <g
+                 
style="fill:none;fill-opacity:1;stroke:#000000;stroke-opacity:0.99122799"
+                 id="g625">
+                <path
+                   d="M 229.893,385.644 C 247.26,406.592 271.501,410.229 
299.066,410.959 C 328.585,412.036 358.232,400.314 365.885,385.645"
+                   
style="fill:none;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:6.25;stroke-linecap:butt;stroke-linejoin:miter;stroke-dasharray:none;stroke-opacity:0.99122799"
+                   id="path609" />
+                <g
+                   
style="fill:none;fill-opacity:1;stroke:#000000;stroke-opacity:0.99122799"
+                   id="g615">
+                  <path
+                     d="M 241.444,354.256 L 241.028,395.468"
+                     
style="fill:none;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:5;stroke-linecap:butt;stroke-linejoin:miter;stroke-dasharray:none;stroke-opacity:0.99122799"
+                     id="path589" />
+                  <path
+                     d="M 254.973,358.627 L 254.765,402.753"
+                     
style="fill:none;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:5;stroke-linecap:butt;stroke-linejoin:miter;stroke-dasharray:none;stroke-opacity:0.99122799"
+                     id="path592" />
+                  <path
+                     d="M 269.959,360.5 L 269.543,406.708"
+                     
style="fill:none;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:5;stroke-linecap:butt;stroke-linejoin:miter;stroke-dasharray:none;stroke-opacity:0.99122799"
+                     id="path593" />
+                  <path
+                     d="M 283.489,361.541 L 283.28,408.373"
+                     
style="fill:none;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:5;stroke-linecap:butt;stroke-linejoin:miter;stroke-dasharray:none;stroke-opacity:0.99122799"
+                     id="path594" />
+                  <path
+                     d="M 298.683,361.957 L 298.683,408.789"
+                     
style="fill:none;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:5;stroke-linecap:butt;stroke-linejoin:miter;stroke-dasharray:none;stroke-opacity:0.99122799"
+                     id="path595" />
+                  <path
+                     d="M 313.253,361.749 L 313.461,408.581"
+                     
style="fill:none;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:5;stroke-linecap:butt;stroke-linejoin:miter;stroke-dasharray:none;stroke-opacity:0.99122799"
+                     id="path598" />
+                  <path
+                     d="M 326.782,360.5 L 327.198,406.5"
+                     transform="translate(-0.41626,-3.051758e-5)"
+                     
style="fill:none;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:5;stroke-linecap:butt;stroke-linejoin:miter;stroke-dasharray:none;stroke-opacity:0.99122799"
+                     id="path599" />
+                  <path
+                     d="M 341.56,358.003 L 341.768,402.129"
+                     
style="fill:none;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:5;stroke-linecap:butt;stroke-linejoin:miter;stroke-dasharray:none;stroke-opacity:0.99122799"
+                     id="path604" />
+                  <path
+                     d="M 355.297,352.591 L 355.714,394.219"
+                     
style="fill:none;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:5;stroke-linecap:butt;stroke-linejoin:miter;stroke-dasharray:none;stroke-opacity:0.99122799"
+                     id="path606" />
+                </g>
+              </g>
+            </g>
+          </g>
+          <g
+             
style="font-size:12px;fill:none;fill-opacity:1;stroke:#000000;stroke-opacity:0.99122799"
+             id="g675">
+            <path
+               d="M 171.498,235.561 C 152.362,216.958 138.988,184.673 
137.132,149.809 C 135.117,111.389 155.35,73.2389 185.669,51.4898 C 
219.638,27.5804 276.435,20.9678 311.751,22.7523 C 335.672,22.7689 
388.957,35.1725 407.766,49.18 C 440.76,73.1701 458.454,107.22 459.68,146.03 C 
461.493,185.013 445.074,214.705 424.969,233.236"
+               
style="fill:none;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:12.5;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:none;stroke-opacity:0.99122799"
+               id="path573" />
+            <path
+               d="M 172.662,126.267 C 164.91,133.049 165.888,143.244 
167.284,158.459 C 168.386,170.019 175.762,181.398 176.15,191.959 C 
178.862,214.244 172.274,236.529 169.173,254.745 C 167.041,275.673 
173.05,293.695 180.801,300.671 C 188.552,307.551 198.557,310.4 209.069,313.607 
C 218.62,316.105 223.573,320.449 230.797,325.835 C 239.403,334.972 
241.456,342.529 241.262,351.831"
+               
style="fill:none;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:12.5;stroke-linecap:butt;stroke-linejoin:round;stroke-dasharray:none;stroke-opacity:0.99122799"
+               id="path580" />
+            <path
+               d="M 172.662,126.267 C 164.91,133.049 165.888,143.244 
167.284,158.459 C 168.386,170.019 175.762,181.398 176.15,191.959 C 
178.862,214.244 172.274,236.529 169.173,254.745 C 167.041,275.673 
173.05,293.695 180.801,300.671 C 188.552,307.551 202.738,311.246 
209.069,313.607 C 216.446,316.188 223.989,320.865 230.797,326.251 C 
238.987,334.139 241.456,342.529 241.262,351.831"
+               transform="matrix(-1,0,0,1,597.7228,-0.58139)"
+               
style="fill:none;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:12.5;stroke-linecap:butt;stroke-linejoin:round;stroke-dasharray:none;stroke-opacity:0.99122799"
+               id="path581" />
+            <path
+               d="M 194.821,310.959 C 201.759,327.749 209.113,344.123 
209.807,361.329 C 206.616,375.205 207.587,391.579 211.056,404.623 C 
215.497,422.523 232.842,443.753 250.188,450.83 C 267.949,457.282 279.05,458.948 
298.892,458.948"
+               
style="fill:none;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:12.5;stroke-linecap:butt;stroke-linejoin:miter;stroke-dasharray:none;stroke-opacity:0.99122799"
+               id="path613" />
+            <path
+               d="M 194.821,310.959 C 201.759,327.749 209.113,344.123 
209.807,361.329 C 206.616,375.205 207.587,391.579 211.056,404.623 C 
215.497,422.523 233.05,443.129 250.396,450.206 C 267.741,457.283 
278.841,458.948 298.684,458.948"
+               transform="matrix(-1,0,0,1,596.7438,-3.051758e-5)"
+               
style="fill:none;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:12.5;stroke-linecap:butt;stroke-linejoin:miter;stroke-dasharray:none;stroke-opacity:0.99122799"
+               id="path614" />
+          </g>
+        </g>
+        <g
+           style="stroke:#000000;stroke-opacity:0.99122799"
+           id="g770">
+          <path
+             d="M 391.308,389.636 L 459.58,421.274 C 467.905,424.743 
474.565,423.633 480.81,421.69 C 490.662,418.776 498.432,420.442 506.619,423.772 
C 516.471,428.767 516.75,435.844 510.367,442.921 C 504.539,449.72 
498.71,453.189 491.634,459.988 C 490.107,470.95 491.078,481.08 486.221,491.21 C 
480.116,500.09 473.594,498.564 463.326,489.128 C 452.919,481.079 
456.665,472.199 441.679,459.155 L 378.403,426.269 L 378.403,426.269"
+             
style="fill:none;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:12.5;stroke-linecap:butt;stroke-linejoin:round;stroke-dasharray:none;stroke-opacity:0.99122799"
+             id="path765" />
+          <path
+             d="M 204.812,389.22 C 182.055,401.292 161.38,412.531 
135.293,422.522 C 114.062,427.795 114.895,414.752 89.0851,423.355 C 
81.7307,429.183 81.8695,437.508 87.8363,443.752 C 94.7745,450.552 
99.6313,454.854 105.737,460.821 C 107.68,469.424 107.957,476.778 
109.067,487.046 C 113.23,499.674 122.388,498.98 130.297,492.875 C 
133.766,488.573 138.068,484.688 140.704,479.97 C 144.312,473.726 
148.336,466.649 153.193,460.821 L 216.052,427.518"
+             
style="fill:none;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:12.5;stroke-linecap:butt;stroke-linejoin:round;stroke-dasharray:none;stroke-opacity:0.99122799"
+             id="path766" />
+          <path
+             d="M 401.299,321.365 C 427.109,308.599 448.339,298.33 
471.651,286.813 C 485.943,274.88 482.336,263.362 493.715,254.759 C 
504.954,244.074 512.447,246.711 516.61,252.678 C 520.634,262.807 
522.577,272.937 522.022,283.483 C 532.706,293.335 538.396,299.024 
544.502,308.045 C 545.334,319.423 535.343,324.14 523.271,324.279 C 
507.452,327.193 504.954,317.202 487.054,324.279 L 392.557,368.821 L 
392.557,368.821"
+             
style="fill:none;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:12.5;stroke-linecap:square;stroke-linejoin:round;stroke-dasharray:none;stroke-opacity:0.99122799"
+             id="path767" />
+          <path
+             d="M 197.22,322.353 C 171.12,309.597 149.436,300.079 
123.63,285.852 C 109.599,274.666 114.113,262.008 97.1383,251.706 C 
89.6812,247.978 84.2847,246.31 78.2994,256.416 C 74.4727,265.444 
74.7671,275.059 74.1784,284.381 C 67.5063,291.543 59.9511,295.763 
54.4564,304.692 C 46.5087,317.448 58.5773,321.667 65.0532,323.237 C 
83.4995,327.848 90.1715,319.508 107.146,322.942 C 140.213,338.347 
173.573,354.34 205.462,370.039"
+             
style="fill:none;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:12.5;stroke-linecap:butt;stroke-linejoin:round;stroke-dasharray:none;stroke-opacity:0.99122799"
+             id="path769" />
+        </g>
+      </g>
+    </g>
+  </g>
+</svg>

Modified: gnunet-gtk/src/plugins/chat/chat.c
===================================================================
--- gnunet-gtk/src/plugins/chat/chat.c  2008-06-07 23:30:04 UTC (rev 7080)
+++ gnunet-gtk/src/plugins/chat/chat.c  2008-06-07 23:31:04 UTC (rev 7081)
@@ -54,7 +54,9 @@
   GtkListStore *nick_model;
   GtkWidget *chatFrame;
   GtkWidget *chat_entry;
+  GtkWidget *tab_label;
   GladeXML *chatXML;
+  GladeXML *labelXML;
   struct GNUNET_CHAT_Room *room;
   GNUNET_HashCode mypid;
 };
@@ -160,7 +162,56 @@
   return NULL;
 }
 
+
 /**
+ * This method is called when the user clicks on 
+ * the "CANCEL (X)" button in the TAB of the
+ * chat notebook.
+ */
+void
+on_closeChatButton_clicked_chat (GtkWidget * chatPage,
+                                GtkWidget * closeButton)
+{
+  struct GNUNET_CHAT_gui_chat_client *pos;
+  struct GNUNET_CHAT_gui_chat_client *prev;
+  GtkNotebook *chatnotebook;
+  int index;
+  int i;
+
+  prev = NULL;
+  pos = list;
+  while (pos != NULL)
+    {
+      if (pos->tab_label == chatPage)
+        break;
+      prev = pos;
+      pos = pos->next;
+    }
+  if (prev == NULL)
+    list = pos->next;
+  else
+    prev->next = pos;
+  GNUNET_GE_ASSERT (NULL, pos != NULL);
+  GNUNET_GTK_run_with_save_calls 
+    ((GNUNET_ThreadMainFunction)&GNUNET_CHAT_leave_room, pos->room);
+
+  chatnotebook =
+    GTK_NOTEBOOK(glade_xml_get_widget (GNUNET_GTK_get_main_glade_XML (), 
"chatnotebook"));
+   /* remove page from notebook */
+  index = -1;
+  for (i = gtk_notebook_get_n_pages (chatnotebook) - 1; i >= 0; i--)
+    if (pos->chatFrame == gtk_notebook_get_nth_page (chatnotebook, i))
+      index = i;
+  GNUNET_GE_BREAK (NULL, index != -1);
+  gtk_notebook_remove_page (chatnotebook, index);
+  UNREF (pos->chatXML);
+  UNREF (pos->labelXML);
+  GNUNET_free(pos);
+}
+
+
+
+/**
  * A message was sent in the chat to us.
  *
  * @param senderNick what is the nickname of the sender? (maybe NULL)
@@ -206,12 +257,29 @@
   struct GNUNET_CHAT_gui_chat_client *client = cls;
   struct GNUNET_CHAT_safe_nick_write_struct writearg;
   char *nick;
+  char *path;
+  char *filename;
 
   GNUNET_hash (pkey, sizeof (GNUNET_RSA_PublicKey), &writearg.pid);
   nick = GNUNET_pseudonym_id_to_name (chat_ectx, chat_cfg, &writearg.pid);
   writearg.model = client->nick_model;
-  /* FIXME: set icon if pid == ours */
   writearg.icon = NULL;
+  if (0 == memcmp(&writearg.pid,
+                 &client->mypid,
+                 sizeof(GNUNET_HashCode)))
+    {
+      path = GNUNET_get_installation_path (GNUNET_IPK_DATADIR);
+      filename =
+       GNUNET_malloc (strlen (path) +
+                      strlen ("/../gnunet-gtk/self.png") + 2);
+      strcpy (filename, path);
+      GNUNET_free (path);
+      strcat (filename, "/../gnunet-gtk/self.png");
+      writearg.icon 
+       = gdk_pixbuf_new_from_file(filename,
+                                  NULL);
+      GNUNET_free(filename);
+    }
   writearg.meta = member_info;
   writearg.nick = nick;
   if (member_info != NULL)
@@ -219,6 +287,8 @@
   else
     GNUNET_GTK_save_call (&remove_nick_save_call, &writearg);
   GNUNET_free (nick);
+  if (writearg.icon != NULL)
+    g_object_unref(writearg.icon);
   return GNUNET_OK;
 }
 
@@ -231,22 +301,26 @@
 
   GNUNET_mutex_lock (lock);
   pos = list;
-  while ((pos != NULL) && (pos->send_button != widget))
+  while ((pos != NULL) && (pos->send_button != widget) &&
+        (pos->chat_entry != widget) )
     pos = pos->next;
   GNUNET_GE_ASSERT (NULL, pos != NULL);
 
   message = (const char *) gtk_entry_get_text (GTK_ENTRY (pos->chat_entry));
-  GNUNET_CHAT_send_message (pos->room,
-                            message, GNUNET_CHAT_MSG_OPTION_NONE, NULL, &seq);
-  gtk_entry_set_text (GTK_ENTRY (pos->chat_entry), "");
+  if (strlen(message) > 0) 
+    {     
+      GNUNET_CHAT_send_message (pos->room,
+                               message, GNUNET_CHAT_MSG_OPTION_NONE, NULL, 
&seq);
+      gtk_entry_set_text (GTK_ENTRY (pos->chat_entry), "");
+    }
   GNUNET_mutex_unlock (lock);
 }
 
 static void
 create_chat_room_tab (const char *room_name, const char *nick)
 {
-  GtkWidget *chatLabel;
   GtkWidget *chatnotebook;
+  GtkLabel *label;
   GtkTreeView *treeview;
   struct GNUNET_CHAT_gui_chat_client *client;
   struct GNUNET_MetaData *meta;
@@ -264,9 +338,19 @@
   GNUNET_GTK_connect_glade_with_plugins (client->chatXML);
   client->chatFrame =
     GNUNET_GTK_extract_main_widget_from_window (client->chatXML, "chatFrame");
-  chatLabel = gtk_label_new (room_name);
+  client->labelXML =
+    glade_xml_new (GNUNET_GTK_get_glade_filename (),
+                  "chatTabLabelWindow", PACKAGE_NAME);
+  GNUNET_GTK_connect_glade_with_plugins (client->labelXML);
+  client->tab_label
+    = GNUNET_GTK_extract_main_widget_from_window (client->labelXML,
+                                                 "chatTabLabelWindow");
+  label = GTK_LABEL (glade_xml_get_widget (client->labelXML,
+                                           "chatTabLabel"));
+  gtk_label_set (label, room_name);
   gtk_notebook_append_page (GTK_NOTEBOOK (chatnotebook),
-                            client->chatFrame, chatLabel);
+                            client->chatFrame, 
+                           client->tab_label);
   gtk_widget_show (chatnotebook);
 
   client->nick_model = gtk_list_store_new (CHAT_NUM, G_TYPE_STRING,     /* 
nickname */





reply via email to

[Prev in Thread] Current Thread [Next in Thread]