~ubuntu-branches/ubuntu/vivid/liferea/vivid-proposed

« back to all changes in this revision

Viewing changes to src/ui/auth_dialog.c

  • Committer: Package Import Robot
  • Author(s): bojo42
  • Date: 2012-03-29 14:17:21 UTC
  • mfrom: (1.3.9) (3.2.5 sid)
  • Revision ID: package-import@ubuntu.com-20120329141721-tbfopcrc5797wxt7
Tags: 1.8.3-0.1ubuntu1
* New upstream release (LP: #290666, #371754, #741543, #716688)
* Merge from Debian unstable (LP: #935147), remaining changes:
* debian/patches:
  - drop gtk-status-icon.patch & notification-append as in upstream
  - drop fix_systray_behavior as mostly upstreamed and rest seems unused
  - 01_ubuntu_feedlists: update & rename, move planets to "Open Source"  
  - add_X-Ubuntu-Gettext-Domain: rebase
  - libunity.patch: rebase, apply before indicator patch (liferea_shell.c)
  - libindicate_increase_version.patch: exclude from libindicate.patch
  - deactivate libindicate.patch, seems partly upstreamed and needs rework
* debian/control: libindicate-dev, libindicate-gtk-dev & libunity-dev
* debian/liferea.indicate & liferea.install: ship indicator desktop file
* debian/rules: enable libindicate

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/**
2
 
 * @file ui_auth.c  authentication dialog
 
2
 * @file auth_dialog.c  authentication dialog
3
3
 *
4
 
 * Copyright (C) 2007-2010 Lars Lindner <lars.lindner@gmail.com>
 
4
 * Copyright (C) 2007-2011 Lars Lindner <lars.lindner@gmail.com>
5
5
 *
6
6
 * This program is free software; you can redistribute it and/or modify
7
7
 * it under the terms of the GNU General Public License as published by
27
27
#include "debug.h"
28
28
#include "ui/liferea_dialog.h"
29
29
 
30
 
static void auth_dialog_class_init      (AuthDialogClass *klass);
31
 
static void auth_dialog_init            (AuthDialog *ad);
32
 
 
33
30
#define AUTH_DIALOG_GET_PRIVATE(object)(G_TYPE_INSTANCE_GET_PRIVATE ((object), AUTH_DIALOG_TYPE, AuthDialogPrivate))
34
31
 
35
32
struct AuthDialogPrivate {
45
42
 
46
43
static GObjectClass *parent_class = NULL;
47
44
 
48
 
GType
49
 
auth_dialog_get_type (void) 
50
 
{
51
 
        static GType type = 0;
52
 
 
53
 
        if (G_UNLIKELY (type == 0)) 
54
 
        {
55
 
                static const GTypeInfo our_info = 
56
 
                {
57
 
                        sizeof (AuthDialogClass),
58
 
                        NULL, /* base_init */
59
 
                        NULL, /* base_finalize */
60
 
                        (GClassInitFunc) auth_dialog_class_init,
61
 
                        NULL,
62
 
                        NULL, /* class_data */
63
 
                        sizeof (AuthDialog),
64
 
                        0, /* n_preallocs */
65
 
                        (GInstanceInitFunc) auth_dialog_init,
66
 
                        NULL /* value_table */
67
 
                };
68
 
 
69
 
                type = g_type_register_static (G_TYPE_OBJECT,
70
 
                                               "AuthDialog",
71
 
                                               &our_info, 0);
72
 
        }
73
 
 
74
 
        return type;
75
 
}
 
45
G_DEFINE_TYPE (AuthDialog, auth_dialog, G_TYPE_OBJECT);
76
46
 
77
47
static void
78
48
auth_dialog_finalize (GObject *object)
121
91
}
122
92
 
123
93
static void
124
 
ui_auth_dialog_load (AuthDialog *ad,
 
94
auth_dialog_load (AuthDialog *ad,
125
95
                     subscriptionPtr subscription,
126
96
                     gint flags)
127
97
{
174
144
        
175
145
        ad->priv = AUTH_DIALOG_GET_PRIVATE (ad);
176
146
        
177
 
        ad->priv->dialog = authdialog = liferea_dialog_new ("auth.glade", "authdialog");
 
147
        ad->priv->dialog = authdialog = liferea_dialog_new ("auth.ui", "authdialog");
178
148
        ad->priv->username = liferea_dialog_lookup (authdialog, "usernameEntry");
179
149
        ad->priv->password = liferea_dialog_lookup (authdialog, "passwordEntry");
180
150
        
185
155
 
186
156
 
187
157
AuthDialog *
188
 
ui_auth_dialog_new (subscriptionPtr subscription, gint flags) 
 
158
auth_dialog_new (subscriptionPtr subscription, gint flags) 
189
159
{
190
160
        AuthDialog *ad;
191
161
        
195
165
        }
196
166
        
197
167
        ad = AUTH_DIALOG (g_object_new (AUTH_DIALOG_TYPE, NULL));
198
 
        ui_auth_dialog_load(ad, subscription, flags);
 
168
        auth_dialog_load(ad, subscription, flags);
199
169
        return ad;
200
170
}