~midori/midori/win32theme

« back to all changes in this revision

Viewing changes to katze/katze-separatoraction.c

  • Committer: Transifex
  • Author(s): Yarema aka Knedlyk
  • Date: 2012-09-22 13:44:56 UTC
  • Revision ID: git-v1:2354a7ed0f7e0dd6f8ecaf49e62a5513b76192a4
l10n: Updated Ukrainian (uk) translation to 100%

New status: 622 messages complete with 0 fuzzies and 0 untranslated.

Transmitted-via: Transifex (translations.xfce.org).

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 Copyright (C) 2009 Christian Dywan <christian@twotoasts.de>
 
3
 
 
4
 This library is free software; you can redistribute it and/or
 
5
 modify it under the terms of the GNU Lesser General Public
 
6
 License as published by the Free Software Foundation; either
 
7
 version 2.1 of the License, or (at your option) any later version.
 
8
 
 
9
 See the file COPYING for the full license text.
 
10
*/
 
11
 
 
12
#include "katze-separatoraction.h"
 
13
 
 
14
struct _KatzeSeparatorAction
 
15
{
 
16
    GtkAction parent_instance;
 
17
};
 
18
 
 
19
struct _KatzeSeparatorActionClass
 
20
{
 
21
    GtkActionClass parent_class;
 
22
};
 
23
 
 
24
G_DEFINE_TYPE (KatzeSeparatorAction, katze_separator_action, GTK_TYPE_ACTION);
 
25
 
 
26
static void
 
27
katze_separator_action_finalize (GObject* object);
 
28
 
 
29
static void
 
30
katze_separator_action_activate (GtkAction* object);
 
31
 
 
32
static GtkWidget*
 
33
katze_separator_action_create_tool_item (GtkAction* action);
 
34
 
 
35
static GtkWidget*
 
36
katze_separator_action_create_menu_item (GtkAction* action);
 
37
 
 
38
static void
 
39
katze_separator_action_connect_proxy (GtkAction* action,
 
40
                                      GtkWidget* proxy);
 
41
 
 
42
static void
 
43
katze_separator_action_disconnect_proxy (GtkAction* action,
 
44
                                         GtkWidget* proxy);
 
45
 
 
46
static void
 
47
katze_separator_action_class_init (KatzeSeparatorActionClass* class)
 
48
{
 
49
    GObjectClass* gobject_class;
 
50
    GtkActionClass* action_class;
 
51
 
 
52
    gobject_class = G_OBJECT_CLASS (class);
 
53
    gobject_class->finalize = katze_separator_action_finalize;
 
54
 
 
55
    action_class = GTK_ACTION_CLASS (class);
 
56
    action_class->activate = katze_separator_action_activate;
 
57
    action_class->create_menu_item = katze_separator_action_create_menu_item;
 
58
    action_class->create_tool_item = katze_separator_action_create_tool_item;
 
59
    action_class->connect_proxy = katze_separator_action_connect_proxy;
 
60
    action_class->disconnect_proxy = katze_separator_action_disconnect_proxy;
 
61
}
 
62
 
 
63
static void
 
64
katze_separator_action_init (KatzeSeparatorAction* separator_action)
 
65
{
 
66
    /* Nothing to do. */
 
67
}
 
68
 
 
69
static void
 
70
katze_separator_action_finalize (GObject* object)
 
71
{
 
72
    G_OBJECT_CLASS (katze_separator_action_parent_class)->finalize (object);
 
73
}
 
74
 
 
75
static void
 
76
katze_separator_action_activate (GtkAction* action)
 
77
{
 
78
    GSList* proxies;
 
79
 
 
80
    proxies = gtk_action_get_proxies (action);
 
81
    if (!proxies)
 
82
        return;
 
83
 
 
84
    do
 
85
    if (GTK_IS_TOOL_ITEM (proxies->data))
 
86
    {
 
87
 
 
88
    }
 
89
    while ((proxies = g_slist_next (proxies)));
 
90
 
 
91
    if (GTK_ACTION_CLASS (katze_separator_action_parent_class)->activate)
 
92
        GTK_ACTION_CLASS (katze_separator_action_parent_class)->activate (action);
 
93
}
 
94
 
 
95
static GtkWidget*
 
96
katze_separator_action_create_menu_item (GtkAction* action)
 
97
{
 
98
    GtkWidget* menuitem;
 
99
 
 
100
    menuitem = gtk_separator_menu_item_new ();
 
101
    return menuitem;
 
102
}
 
103
 
 
104
static GtkWidget*
 
105
katze_separator_action_create_tool_item (GtkAction* action)
 
106
{
 
107
    GtkWidget* toolitem;
 
108
 
 
109
    toolitem = GTK_WIDGET (gtk_separator_tool_item_new ());
 
110
    return toolitem;
 
111
}
 
112
 
 
113
static void
 
114
katze_separator_action_connect_proxy (GtkAction* action,
 
115
                                      GtkWidget* proxy)
 
116
{
 
117
    GTK_ACTION_CLASS (katze_separator_action_parent_class)->connect_proxy (
 
118
        action, proxy);
 
119
 
 
120
    if (GTK_IS_TOOL_ITEM (proxy))
 
121
    {
 
122
    }
 
123
    else if (GTK_IS_MENU_ITEM (proxy))
 
124
    {
 
125
    }
 
126
}
 
127
 
 
128
static void
 
129
katze_separator_action_disconnect_proxy (GtkAction* action,
 
130
                                         GtkWidget* proxy)
 
131
{
 
132
    GTK_ACTION_CLASS (katze_separator_action_parent_class)->disconnect_proxy
 
133
        (action, proxy);
 
134
}