~ubuntu-branches/ubuntu/maverick/xchat/maverick

« back to all changes in this revision

Viewing changes to debian/patches/11_fix_dcc_close_message.dpatch

  • Committer: Bazaar Package Importer
  • Author(s): Lorenzo De Liso
  • Date: 2010-06-21 22:47:10 UTC
  • mfrom: (2.1.7 sid)
  • Revision ID: james.westby@ubuntu.com-20100621224710-9t1iyiglri330pss
Tags: 2.8.8-1ubuntu1
* Merge from debian unstable (LP: #597042), remaining changes:
  - debian/patches:
    + series: Refreshed.
    + 01_serverlist.patch: Numerous changes to default serverlist.
    + 02_ubuntu_default_server.patch: select "Ubuntu servers" by default.
    + 37_lpi.patch: Add launchpad integration.
    + 38_autoconf.patch: Autoconf modifications for launchpad integration.
    + 45_brand_ctcp_version.patch: Add Ubuntu brand to CTCP version response.
    + 70_notification_strings_shorten.patch: Shorten notification strings.
  - debian/control:
    + Build-depend on libgtk2.0-dev (>= 2.10.0).
    + Build-depend on liblaunchpad-integration-dev.
    + Remove conflict/replaces on xchat-gnome.
    + Updated Maintainer field to match Ubuntu Developers.
  - debian/rules:
    + Make build independent of the python version.
  - debian/patches/45_ctcp_version_less_information.dpatch: 
    + Renamed to debian/patches/45_brand_ctcp_version.patch
    + Added short description.
* Converted all patches to quilt, as in debian quilt has been
  adopted, all old dpatch patches have been renamed with the 
  *.patch extension.
* Dropped changes:
  - 71_notification_icon_change.patch: can't be applied

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#! /bin/sh /usr/share/dpatch/dpatch-run
2
 
## 11_fix_dcc_close_message.dpatch by Pedro Villavicencio Garrido <pvillavi@gnome.cl>
3
 
##
4
 
## All lines beginning with `## DP:' are a description of the patch.
5
 
## DP: Fix incorrect Warning message when quitting with DCC chat active (207929)
6
 
 
7
 
@DPATCH@
8
 
diff -Naur xchat-2.8.2foo/src/fe-gtk/maingui.c xchat-2.8.2/src/fe-gtk/maingui.c
9
 
--- xchat-2.8.2foo/src/fe-gtk/maingui.c 2007-04-01 10:59:09.000000000 +0200
10
 
+++ xchat-2.8.2/src/fe-gtk/maingui.c    2007-06-10 15:58:37.000000000 +0200
11
 
@@ -1639,6 +1639,24 @@
12
 
        return 0;
13
 
 }
14
 
 
15
 
+static int
16
 
+mg_dcc_ischat(void)
17
 
+{
18
 
+       GSList *list;
19
 
+       struct DCC *dcc;
20
 
+
21
 
+       list = dcc_list;
22
 
+       while(list)
23
 
+       {
24
 
+               dcc = list->data;
25
 
+               if(!dcc->file)
26
 
+                       return 1;
27
 
+               list = list->next;
28
 
+       }
29
 
+
30
 
+       return 0;
31
 
+}
32
 
+
33
 
 void
34
 
 mg_safe_quit (void)
35
 
 {
36
 
@@ -1646,9 +1664,16 @@
37
 
 
38
 
        if (mg_dcc_active ())
39
 
        {
40
 
-               dialog = gtk_message_dialog_new (NULL, 0,
41
 
-                                                                       GTK_MESSAGE_WARNING, GTK_BUTTONS_YES_NO,
42
 
-                                                               _("Some file transfers still active, quit xchat?"));
43
 
+               if(mg_dcc_ischat()){
44
 
+                       dialog = gtk_message_dialog_new (NULL, 0,
45
 
+                                                       GTK_MESSAGE_WARNING, GTK_BUTTONS_YES_NO,
46
 
+                                                       _("Some DCC Chats still active, quit xchat?"));
47
 
+               }else{
48
 
+                       dialog = gtk_message_dialog_new(NULL, 0,
49
 
+                                                       GTK_MESSAGE_WARNING, GTK_BUTTONS_YES_NO,
50
 
+                                                       _("Some file transfers still active, quit xchat?"));
51
 
+               }
52
 
+               
53
 
                g_signal_connect (G_OBJECT (dialog), "response",
54
 
                                                                G_CALLBACK (mg_dcc_cb), NULL);
55
 
                gtk_window_set_position (GTK_WINDOW (dialog), GTK_WIN_POS_MOUSE);