aboutsummaryrefslogtreecommitdiffstats
path: root/x11
diff options
context:
space:
mode:
authormph <mph@FreeBSD.org>1999-06-23 07:51:41 +0800
committermph <mph@FreeBSD.org>1999-06-23 07:51:41 +0800
commit52b108aaaa2449970d447c4049b6e5fc07516d43 (patch)
tree23606f43cde3dab43b0bc2f4acceef7b63000815 /x11
parent6a26fb2d16c511b34fcbf3a960ad29f74b3d45c3 (diff)
downloadfreebsd-ports-gnome-52b108aaaa2449970d447c4049b6e5fc07516d43.tar.gz
freebsd-ports-gnome-52b108aaaa2449970d447c4049b6e5fc07516d43.tar.zst
freebsd-ports-gnome-52b108aaaa2449970d447c4049b6e5fc07516d43.zip
Assign MAINTAINERship to submitter.
PR: 12353, 12354 Submitted by: Will Andrews <andrews@technologist.com>
Diffstat (limited to 'x11')
-rw-r--r--x11/rxvt-devel/Makefile4
-rw-r--r--x11/rxvt-unicode/Makefile4
-rw-r--r--x11/rxvt/Makefile4
3 files changed, 6 insertions, 6 deletions
diff --git a/x11/rxvt-devel/Makefile b/x11/rxvt-devel/Makefile
index 619411b3da14..eaaff07dbff5 100644
--- a/x11/rxvt-devel/Makefile
+++ b/x11/rxvt-devel/Makefile
@@ -3,7 +3,7 @@
# Date created: 5th December 1994
# Whom: gpalmer@FreeBSD.org
#
-# $Id: Makefile,v 1.21 1999/04/13 06:33:08 mharo Exp $
+# $Id: Makefile,v 1.22 1999/06/08 22:10:19 steve Exp $
#
DISTNAME= rxvt-2.6.0
@@ -13,7 +13,7 @@ MASTER_SITES= ftp://ftp.rxvt.org/pub/rxvt/ \
http://wm.current.nu/files/ \
ftp://ftp.nstu.ru/pub/sources/x/
-MAINTAINER= ports@FreeBSD.ORG
+MAINTAINER= andrews@technologist.com
USE_X_PREFIX= yes
GNU_CONFIGURE= yes
diff --git a/x11/rxvt-unicode/Makefile b/x11/rxvt-unicode/Makefile
index 619411b3da14..eaaff07dbff5 100644
--- a/x11/rxvt-unicode/Makefile
+++ b/x11/rxvt-unicode/Makefile
@@ -3,7 +3,7 @@
# Date created: 5th December 1994
# Whom: gpalmer@FreeBSD.org
#
-# $Id: Makefile,v 1.21 1999/04/13 06:33:08 mharo Exp $
+# $Id: Makefile,v 1.22 1999/06/08 22:10:19 steve Exp $
#
DISTNAME= rxvt-2.6.0
@@ -13,7 +13,7 @@ MASTER_SITES= ftp://ftp.rxvt.org/pub/rxvt/ \
http://wm.current.nu/files/ \
ftp://ftp.nstu.ru/pub/sources/x/
-MAINTAINER= ports@FreeBSD.ORG
+MAINTAINER= andrews@technologist.com
USE_X_PREFIX= yes
GNU_CONFIGURE= yes
diff --git a/x11/rxvt/Makefile b/x11/rxvt/Makefile
index 619411b3da14..eaaff07dbff5 100644
--- a/x11/rxvt/Makefile
+++ b/x11/rxvt/Makefile
@@ -3,7 +3,7 @@
# Date created: 5th December 1994
# Whom: gpalmer@FreeBSD.org
#
-# $Id: Makefile,v 1.21 1999/04/13 06:33:08 mharo Exp $
+# $Id: Makefile,v 1.22 1999/06/08 22:10:19 steve Exp $
#
DISTNAME= rxvt-2.6.0
@@ -13,7 +13,7 @@ MASTER_SITES= ftp://ftp.rxvt.org/pub/rxvt/ \
http://wm.current.nu/files/ \
ftp://ftp.nstu.ru/pub/sources/x/
-MAINTAINER= ports@FreeBSD.ORG
+MAINTAINER= andrews@technologist.com
USE_X_PREFIX= yes
GNU_CONFIGURE= yes
m> 2009-11-14 00:26:43 +0800 EWebView popup menu enhancements.' href='/~lantw44/cgit/gsoc2013-evolution/commit/widgets/misc/e-popup-action.c?h=EVOLUTION_3_7_4&id=c5e04ca04066ae2d92d3999626ef91d5d0606cab'>c5e04ca040
22d41a51fa
c5e04ca040








22d41a51fa











23f5773903
22d41a51fa
c5e04ca040








22d41a51fa


ecf3434da0
22d41a51fa


c5e04ca040


22d41a51fa
c5e04ca040


22d41a51fa
c5e04ca040


22d41a51fa
c5e04ca040


22d41a51fa
c5e04ca040



22d41a51fa
c5e04ca040
22d41a51fa
c5e04ca040



22d41a51fa
c5e04ca040
22d41a51fa
c5e04ca040



22d41a51fa
c5e04ca040




























22d41a51fa
c5e04ca040

22d41a51fa
c5e04ca040






















22d41a51fa


ecf3434da0
22d41a51fa


22d41a51fa






c5e04ca040





22d41a51fa
c5e04ca040




ecf3434da0
22d41a51fa
23f5773903
c5e04ca040



22d41a51fa

ecf3434da0

22d41a51fa
ecf3434da0

22d41a51fa


c5e04ca040
22d41a51fa
22d41a51fa
22d41a51fa
c5e04ca040
22d41a51fa












c5e04ca040
22d41a51fa




c5e04ca040

22d41a51fa
c5e04ca040
22d41a51fa
c5e04ca040

22d41a51fa



c5e04ca040



22d41a51fa
c5e04ca040


22d41a51fa






1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408













                                                                    
                                                                             





                                                        



                    


                           
 



                                                          

               

                                  


                             



                                       

  









                                                                             

           


                                                    
 
                                   
 












































































                                                                          
                                                                               

                       






                                                                             








                                               

                                                         


                                                            





                                                                











                                                                       
                                         
                                            








                                                                        











                                                                       
                                                   
 








                                                      


                                                    
                                                                       


           


                                                 
 


                            
 


                                                        
 


                                                   
 



                                                                    
 
                                                                        
 



                                                                          
 
                                                                             
 



                                     
 




























                                                                   
 

                                                                     
 






















                                                     


           
                                                    


                                   






                                                                       





                                          
                             




                                           
                                                
 
                                                                       



                                                                  

 

                                                                
 

                                                                                


              
                                      
 
                                                  
 
                                                                      












                                                                   
                                          




                                                           

                                                              
 
                                             
                                   

                                                                         



                                                                          



                                                                        
 


                                                                  






                                                                 
/*
 * e-popup-action.c
 *
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2 of the License, or (at your option) version 3.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with the program; if not, see <http://www.gnu.org/licenses/>
 *
 *
 * Copyright (C) 1999-2008 Novell, Inc. (www.novell.com)
 *
 */

#ifdef HAVE_CONFIG_H
#include <config.h>
#endif

#include "e-popup-action.h"

#include <glib/gi18n.h>

#define E_POPUP_ACTION_GET_PRIVATE(obj) \
    (G_TYPE_INSTANCE_GET_PRIVATE \
    ((obj), E_TYPE_POPUP_ACTION, EPopupActionPrivate))

enum {
    PROP_0,
    PROP_RELATED_ACTION,
    PROP_USE_ACTION_APPEARANCE
};

struct _EPopupActionPrivate {
    GtkAction *related_action;
    gboolean use_action_appearance;
    gulong activate_handler_id;
    gulong notify_handler_id;
};

/* Forward Declarations */
static void e_popup_action_activatable_init (GtkActivatableIface *interface);

G_DEFINE_TYPE_WITH_CODE (
    EPopupAction,
    e_popup_action,
    GTK_TYPE_ACTION,
    G_IMPLEMENT_INTERFACE (
        GTK_TYPE_ACTIVATABLE,
        e_popup_action_activatable_init))

static void
popup_action_notify_cb (GtkAction *action,
                        GParamSpec *pspec,
                        GtkActivatable *activatable)
{
    GtkActivatableIface *iface;

    iface = GTK_ACTIVATABLE_GET_IFACE (activatable);
    g_return_if_fail (iface->update != NULL);

    iface->update (activatable, action, pspec->name);
}

static GtkAction *
popup_action_get_related_action (EPopupAction *popup_action)
{
    return popup_action->priv->related_action;
}

static void
popup_action_set_related_action (EPopupAction *popup_action,
                                 GtkAction *related_action)
{
    GtkActivatable *activatable;

    /* Do not call gtk_activatable_do_set_related_action() because
     * it assumes the activatable object is a widget and tries to add
     * it to the related actions's proxy list.  Instead we'll just do
     * the relevant steps manually. */

    activatable = GTK_ACTIVATABLE (popup_action);

    if (related_action == popup_action->priv->related_action)
        return;

    if (related_action != NULL)
        g_object_ref (related_action);

    if (popup_action->priv->related_action != NULL) {
        g_signal_handler_disconnect (
            popup_action,
            popup_action->priv->activate_handler_id);
        g_signal_handler_disconnect (
            popup_action->priv->related_action,
            popup_action->priv->notify_handler_id);
        popup_action->priv->activate_handler_id = 0;
        popup_action->priv->notify_handler_id = 0;
        g_object_unref (popup_action->priv->related_action);
    }

    popup_action->priv->related_action = related_action;

    if (related_action != NULL) {
        popup_action->priv->activate_handler_id =
            g_signal_connect_swapped (
                popup_action, "activate",
                G_CALLBACK (gtk_action_activate),
                related_action);
        popup_action->priv->notify_handler_id =
            g_signal_connect (
                related_action, "notify",
                G_CALLBACK (popup_action_notify_cb),
                popup_action);
        gtk_activatable_sync_action_properties (
            activatable, related_action);
    } else
        gtk_action_set_visible (GTK_ACTION (popup_action), FALSE);

    g_object_notify (G_OBJECT (popup_action), "related-action");
}

static gboolean
popup_action_get_use_action_appearance (EPopupAction *popup_action)
{
    return popup_action->priv->use_action_appearance;
}

static void
popup_action_set_use_action_appearance (EPopupAction *popup_action,
                                        gboolean use_action_appearance)
{
    GtkActivatable *activatable;
    GtkAction *related_action;

    if (popup_action->priv->use_action_appearance == use_action_appearance)
        return;

    popup_action->priv->use_action_appearance = use_action_appearance;

    g_object_notify (G_OBJECT (popup_action), "use-action-appearance");

    activatable = GTK_ACTIVATABLE (popup_action);
    related_action = popup_action_get_related_action (popup_action);
    gtk_activatable_sync_action_properties (activatable, related_action);
}

static void
popup_action_set_property (GObject *object,
                           guint property_id,
                           const GValue *value,
                           GParamSpec *pspec)
{
    switch (property_id) {
        case PROP_RELATED_ACTION:
            popup_action_set_related_action (
                E_POPUP_ACTION (object),
                g_value_get_object (value));
            return;

        case PROP_USE_ACTION_APPEARANCE:
            popup_action_set_use_action_appearance (
                E_POPUP_ACTION (object),
                g_value_get_boolean (value));
            return;
    }

    G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
}

static void
popup_action_get_property (GObject *object,
                           guint property_id,
                           GValue *value,
                           GParamSpec *pspec)
{
    switch (property_id) {
        case PROP_RELATED_ACTION:
            g_value_set_object (
                value,
                popup_action_get_related_action (
                E_POPUP_ACTION (object)));
            return;

        case PROP_USE_ACTION_APPEARANCE:
            g_value_set_boolean (
                value,
                popup_action_get_use_action_appearance (
                E_POPUP_ACTION (object)));
            return;
    }

    G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
}

static void
popup_action_dispose (GObject *object)
{
    EPopupActionPrivate *priv;

    priv = E_POPUP_ACTION_GET_PRIVATE (object);

    if (priv->related_action != NULL) {
        g_signal_handler_disconnect (
            object,
            priv->activate_handler_id);
        g_signal_handler_disconnect (
            priv->related_action,
            priv->notify_handler_id);
        g_object_unref (priv->related_action);
        priv->related_action = NULL;
    }

    /* Chain up to parent's dispose() method. */
    G_OBJECT_CLASS (e_popup_action_parent_class)->dispose (object);
}

static void
popup_action_update (GtkActivatable *activatable,
                     GtkAction *action,
                     const gchar *property_name)
{
    GObjectClass *class;
    GParamSpec *pspec;
    GValue *value;

    /* Ignore "action-group" changes" */
    if (strcmp (property_name, "action-group") == 0)
        return;

    /* Ignore "visible" changes. */
    if (strcmp (property_name, "visible") == 0)
        return;

    value = g_slice_new0 (GValue);
    class = G_OBJECT_GET_CLASS (action);
    pspec = g_object_class_find_property (class, property_name);
    g_value_init (value, pspec->value_type);

    g_object_get_property (G_OBJECT (action), property_name, value);

    if (strcmp (property_name, "sensitive") == 0)
        property_name = "visible";
    else if (!gtk_activatable_get_use_action_appearance (activatable))
        goto exit;

    g_object_set_property (G_OBJECT (activatable), property_name, value);

exit:
    g_value_unset (value);
    g_slice_free (GValue, value);
}

static void
popup_action_sync_action_properties (GtkActivatable *activatable,
                                     GtkAction *action)
{
    if (action == NULL)
        return;

    /* XXX GTK+ 2.18 is still missing accessor functions for
     *     "hide-if-empty" and "visible-overflown" properties.
     *     These are rarely used so we'll skip them for now. */

    /* A popup action is never shown as insensitive. */
    gtk_action_set_sensitive (GTK_ACTION (activatable), TRUE);

    gtk_action_set_visible (
        GTK_ACTION (activatable),
        gtk_action_get_sensitive (action));

    gtk_action_set_visible_horizontal (
        GTK_ACTION (activatable),
        gtk_action_get_visible_horizontal (action));

    gtk_action_set_visible_vertical (
        GTK_ACTION (activatable),
        gtk_action_get_visible_vertical (action));

    gtk_action_set_is_important (
        GTK_ACTION (activatable),
        gtk_action_get_is_important (action));

    if (!gtk_activatable_get_use_action_appearance (activatable))
        return;

    gtk_action_set_label (
        GTK_ACTION (activatable),
        gtk_action_get_label (action));

    gtk_action_set_short_label (
        GTK_ACTION (activatable),
        gtk_action_get_short_label (action));

    gtk_action_set_tooltip (
        GTK_ACTION (activatable),
        gtk_action_get_tooltip (action));

    gtk_action_set_stock_id (
        GTK_ACTION (activatable),
        gtk_action_get_stock_id (action));

    gtk_action_set_gicon (
        GTK_ACTION (activatable),
        gtk_action_get_gicon (action));

    gtk_action_set_icon_name (
        GTK_ACTION (activatable),
        gtk_action_get_icon_name (action));
}

static void
e_popup_action_class_init (EPopupActionClass *class)
{
    GObjectClass *object_class;

    g_type_class_add_private (class, sizeof (EPopupActionPrivate));

    object_class = G_OBJECT_CLASS (class);
    object_class->set_property = popup_action_set_property;
    object_class->get_property = popup_action_get_property;
    object_class->dispose = popup_action_dispose;

    g_object_class_override_property (
        object_class,
        PROP_RELATED_ACTION,
        "related-action");

    g_object_class_override_property (
        object_class,
        PROP_USE_ACTION_APPEARANCE,
        "use-action-appearance");
}

static void
e_popup_action_init (EPopupAction *popup_action)
{
    popup_action->priv = E_POPUP_ACTION_GET_PRIVATE (popup_action);
    popup_action->priv->use_action_appearance = TRUE;

    /* Remain invisible until we have a related action. */
    gtk_action_set_visible (GTK_ACTION (popup_action), FALSE);
}

static void
e_popup_action_activatable_init (GtkActivatableIface *interface)
{
    interface->update = popup_action_update;
    interface->sync_action_properties = popup_action_sync_action_properties;
}

EPopupAction *
e_popup_action_new (const gchar *name)
{
    g_return_val_if_fail (name != NULL, NULL);

    return g_object_new (E_TYPE_POPUP_ACTION, "name", name, NULL);
}

void
e_action_group_add_popup_actions (GtkActionGroup *action_group,
                                  const EPopupActionEntry *entries,
                                  guint n_entries)
{
    guint ii;

    g_return_if_fail (GTK_IS_ACTION_GROUP (action_group));

    for (ii = 0; ii < n_entries; ii++) {
        EPopupAction *popup_action;
        GtkAction *related_action;
        const gchar *label;

        label = gtk_action_group_translate_string (
            action_group, entries[ii].label);

        related_action = gtk_action_group_get_action (
            action_group, entries[ii].related);

        if (related_action == NULL) {
            g_warning (
                "Related action '%s' not found in "
                "action group '%s'", entries[ii].related,
                gtk_action_group_get_name (action_group));
            continue;
        }

        popup_action = e_popup_action_new (entries[ii].name);

        gtk_activatable_set_related_action (
            GTK_ACTIVATABLE (popup_action), related_action);

        if (label != NULL && *label != '\0')
            gtk_action_set_label (
                GTK_ACTION (popup_action), label);

        gtk_action_group_add_action (
            action_group, GTK_ACTION (popup_action));

        g_object_unref (popup_action);
    }
}