~ubuntu-branches/ubuntu/wily/sflphone/wily

« back to all changes in this revision

Viewing changes to gnome/src/sflphone_client.c

  • Committer: Package Import Robot
  • Author(s): Jonathan Riddell
  • Date: 2015-01-07 14:51:16 UTC
  • mfrom: (4.3.5 sid)
  • Revision ID: package-import@ubuntu.com-20150107145116-yxnafinf4lrdvrmx
Tags: 1.4.1-0.1ubuntu1
* Merge with Debian, remaining changes:
 - Drop soprano, nepomuk build-dep
* Drop ubuntu patches, now upstream

Show diffs side-by-side

added added

removed removed

Lines of Context:
29
29
 *  as that of the covered work.
30
30
 */
31
31
 
 
32
#ifdef HAVE_CONFIG_H
 
33
#include "config.h"
 
34
#endif
 
35
 
32
36
#include <glib/gi18n.h>
33
37
#include "sflphone_client.h"
34
38
#include "sflphone_options.h"
36
40
#include "statusicon.h"
37
41
#include "shortcuts.h"
38
42
#include "mainwindow.h"
 
43
#ifdef SFL_VIDEO
 
44
#include "video/video_widget.h"
 
45
#endif
39
46
 
40
47
G_DEFINE_TYPE(SFLPhoneClient, sflphone_client, GTK_TYPE_APPLICATION);
41
48
 
59
66
 
60
67
    g_option_context_free(context);
61
68
 
 
69
    /* Override theme since we don't have appropriate icons for a dark them (yet) */
 
70
        GtkSettings *gtk_settings = gtk_settings_get_default();
 
71
        g_object_set(G_OBJECT(gtk_settings), "gtk-application-prefer-dark-theme",
 
72
                 FALSE, NULL);
 
73
 
62
74
    if (!sflphone_init(&error, client)) {
63
75
        g_warning("%s", error->message);
64
76
        GtkWidget *dialog = gtk_message_dialog_new(NULL,
65
77
                                GTK_DIALOG_MODAL | GTK_DIALOG_DESTROY_WITH_PARENT,
66
78
                                GTK_MESSAGE_ERROR, GTK_BUTTONS_CLOSE,
67
 
                                "Unable to initialize.\nMake sure the daemon is running.\nError: %s",
 
79
                                _("Unable to initialize.\nMake sure the daemon is running.\nError: %s"),
68
80
                                error->message);
69
81
 
70
82
        gtk_window_set_title(GTK_WINDOW(dialog), _("SFLphone Error"));
110
122
sflphone_client_init(SFLPhoneClient *self)
111
123
{
112
124
    self->settings = g_settings_new(SFLPHONE_GSETTINGS_SCHEMA);
 
125
 
 
126
#ifdef SFL_VIDEO
 
127
    self->video = video_widget_new();
 
128
#endif
 
129
 
113
130
    self->win = 0;
114
131
    g_signal_connect(G_OBJECT(self), "command-line", G_CALLBACK(sflphone_client_command_line_handler), self);
115
132
}