~noskcaj/ubuntu/vivid/thunar/1.6.4

« back to all changes in this revision

Viewing changes to thunar/thunar-shortcuts-pane.c

  • Committer: Bazaar Package Importer
  • Author(s): Lionel Le Folgoc
  • Date: 2010-12-04 16:46:20 UTC
  • mto: (2.1.3 experimental) (1.3.1)
  • mto: This revision was merged to the branch mainline in revision 69.
  • Revision ID: james.westby@ubuntu.com-20101204164620-h7p4t2e9z6hfhz6l
Tags: upstream-1.1.4
ImportĀ upstreamĀ versionĀ 1.1.4

Show diffs side-by-side

added added

removed removed

Lines of Context:
43
43
 
44
44
 
45
45
 
46
 
static void          thunar_shortcuts_pane_class_init            (ThunarShortcutsPaneClass *klass);
47
46
static void          thunar_shortcuts_pane_component_init        (ThunarComponentIface     *iface);
48
47
static void          thunar_shortcuts_pane_navigator_init        (ThunarNavigatorIface     *iface);
49
48
static void          thunar_shortcuts_pane_side_pane_init        (ThunarSidePaneIface      *iface);
50
 
static void          thunar_shortcuts_pane_init                  (ThunarShortcutsPane      *shortcuts_pane);
51
49
static void          thunar_shortcuts_pane_dispose               (GObject                  *object);
52
50
static void          thunar_shortcuts_pane_finalize              (GObject                  *object);
53
51
static void          thunar_shortcuts_pane_get_property          (GObject                  *object,
98
96
  { "sendto-shortcuts", THUNAR_STOCK_SHORTCUTS, "", NULL, NULL, G_CALLBACK (thunar_shortcuts_pane_action_shortcuts_add), },
99
97
};
100
98
 
101
 
static GObjectClass *thunar_shortcuts_pane_parent_class;
102
 
 
103
 
 
104
 
 
105
 
GType
106
 
thunar_shortcuts_pane_get_type (void)
107
 
{
108
 
  static GType type = G_TYPE_INVALID;
109
 
 
110
 
  if (G_UNLIKELY (type == G_TYPE_INVALID))
111
 
    {
112
 
      static const GTypeInfo info =
113
 
      {
114
 
        sizeof (ThunarShortcutsPaneClass),
115
 
        NULL,
116
 
        NULL,
117
 
        (GClassInitFunc) thunar_shortcuts_pane_class_init,
118
 
        NULL,
119
 
        NULL,
120
 
        sizeof (ThunarShortcutsPane),
121
 
        0,
122
 
        (GInstanceInitFunc) thunar_shortcuts_pane_init,
123
 
        NULL,
124
 
      };
125
 
 
126
 
      static const GInterfaceInfo component_info =
127
 
      {
128
 
        (GInterfaceInitFunc) thunar_shortcuts_pane_component_init,
129
 
        NULL,
130
 
        NULL,
131
 
      };
132
 
 
133
 
      static const GInterfaceInfo navigator_info =
134
 
      {
135
 
        (GInterfaceInitFunc) thunar_shortcuts_pane_navigator_init,
136
 
        NULL,
137
 
        NULL,
138
 
      };
139
 
 
140
 
      static const GInterfaceInfo side_pane_info =
141
 
      {
142
 
        (GInterfaceInitFunc) thunar_shortcuts_pane_side_pane_init,
143
 
        NULL,
144
 
        NULL,
145
 
      };
146
 
 
147
 
      type = g_type_register_static (GTK_TYPE_SCROLLED_WINDOW, I_("ThunarShortcutsPane"), &info, 0);
148
 
      g_type_add_interface_static (type, THUNAR_TYPE_NAVIGATOR, &navigator_info);
149
 
      g_type_add_interface_static (type, THUNAR_TYPE_COMPONENT, &component_info);
150
 
      g_type_add_interface_static (type, THUNAR_TYPE_SIDE_PANE, &side_pane_info);
151
 
    }
152
 
 
153
 
  return type;
154
 
}
 
99
 
 
100
 
 
101
G_DEFINE_TYPE_WITH_CODE (ThunarShortcutsPane, thunar_shortcuts_pane, GTK_TYPE_SCROLLED_WINDOW,
 
102
    G_IMPLEMENT_INTERFACE (THUNAR_TYPE_NAVIGATOR, thunar_shortcuts_pane_navigator_init)
 
103
    G_IMPLEMENT_INTERFACE (THUNAR_TYPE_COMPONENT, thunar_shortcuts_pane_component_init)
 
104
    G_IMPLEMENT_INTERFACE (THUNAR_TYPE_SIDE_PANE, thunar_shortcuts_pane_side_pane_init))
155
105
 
156
106
 
157
107
 
160
110
{
161
111
  GObjectClass *gobject_class;
162
112
 
163
 
  /* determine the parent type class */
164
 
  thunar_shortcuts_pane_parent_class = g_type_class_peek_parent (klass);
165
 
 
166
113
  gobject_class = G_OBJECT_CLASS (klass);
167
114
  gobject_class->dispose = thunar_shortcuts_pane_dispose;
168
115
  gobject_class->finalize = thunar_shortcuts_pane_finalize;