Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
savoirfairelinux
jami-client-gnome
Commits
24dcd5c8
Commit
24dcd5c8
authored
Mar 26, 2015
by
Stepan Salenikovich
Browse files
gnome: add about dialog
Refs #69343 Change-Id: I3ef4e4af22c503d5fb92ab544afca43a8b195a32
parent
213fd917
Changes
4
Hide whitespace changes
Inline
Side-by-side
AUTHORS
View file @
24dcd5c8
...
...
@@ -2,6 +2,7 @@ Current authors
---------------
Stepan Salenikovich <stepan dot salenikovich at savoirfairelinux dot com>
Eloi B
AI
L <eloi dot bail at savoirfairelinux dot com>
Eloi B
ai
L <eloi dot bail at savoirfairelinux dot com>
Guillaume Roguez <guillaume dot roguez at savoirfairelinux dot com>
Emmanuel Lepage <emmanuel dot lepage at savoirfairelinux dot com>
Alexandre Lision <alexandre dot lision at savoirfairelinux dot com>
src/dialogs.c
View file @
24dcd5c8
...
...
@@ -31,6 +31,8 @@
#include
"dialogs.h"
#include
<gtk/gtk.h>
#include
<glib/gprintf.h>
#include
"config.h"
GtkWidget
*
ring_dialog_working
(
GtkWidget
*
parent
,
const
gchar
*
msg
)
...
...
@@ -70,4 +72,54 @@ ring_dialog_working(GtkWidget *parent, const gchar *msg)
gtk_widget_show_all
(
content_area
);
return
dialog
;
}
\ No newline at end of file
}
void
ring_about_dialog
(
GtkWidget
*
parent
)
{
/* get parent window */
if
(
parent
&&
GTK_IS_WIDGET
(
parent
))
parent
=
gtk_widget_get_toplevel
(
GTK_WIDGET
(
parent
));
/* get logo */
GError
*
error
=
NULL
;
GdkPixbuf
*
logo
=
gdk_pixbuf_new_from_resource
(
"/cx/ring/RingGnome/ring-logo-blue"
,
&
error
);
if
(
logo
==
NULL
)
{
g_debug
(
"Could not load logo: %s"
,
error
->
message
);
g_error_free
(
error
);
}
gchar
*
version
=
g_strdup_printf
(
"%d.%d.%d"
,
VERSION_MAJOR
,
VERSION_MINOR
,
VERSION_PATCH
);
const
gchar
*
authors
[]
=
{
[
0
]
=
"Stepan Salenikovich"
,
[
1
]
=
"Éloi Bail"
,
[
2
]
=
"Guillaume Roguez"
,
[
3
]
=
"Emmanuel Lepage"
,
[
4
]
=
"Alexandre Lision"
,
[
5
]
=
"Thibault Cohen"
,
[
6
]
=
NULL
,
};
const
gchar
*
artists
[]
=
{
[
0
]
=
"Marianne Forget"
,
[
1
]
=
NULL
,
};
gtk_show_about_dialog
(
GTK_WINDOW
(
parent
),
"program-name"
,
"Gnome Ring"
,
"copyright"
,
"© 2015 Savoir-faire Linux"
,
"license-type"
,
GTK_LICENSE_GPL_3_0
,
"logo"
,
logo
,
"version"
,
version
,
"comments"
,
"The GNOME client for Ring.
\n
Ring is a Voice-over-IP software phone."
,
"authors"
,
authors
,
"website"
,
"http://www.ring.cx/"
,
"website-label"
,
"www.ring.cx"
,
"artists"
,
artists
,
NULL
);
g_free
(
version
);
}
src/dialogs.h
View file @
24dcd5c8
...
...
@@ -36,6 +36,7 @@
G_BEGIN_DECLS
GtkWidget
*
ring_dialog_working
(
GtkWidget
*
parent
,
const
gchar
*
msg
);
void
ring_about_dialog
(
GtkWidget
*
parent
);
G_END_DECLS
...
...
src/ring_client.cpp
View file @
24dcd5c8
...
...
@@ -44,6 +44,7 @@
#include
"ring_client_options.h"
#include
"ringmainwindow.h"
#include
"backends/minimalhistorybackend.h"
#include
"dialogs.h"
struct
_RingClientClass
{
...
...
@@ -111,12 +112,24 @@ action_quit(G_GNUC_UNUSED GSimpleAction *simple,
#endif
}
static
void
action_about
(
G_GNUC_UNUSED
GSimpleAction
*
simple
,
G_GNUC_UNUSED
GVariant
*
parameter
,
gpointer
user_data
)
{
g_return_if_fail
(
G_IS_APPLICATION
(
user_data
));
RingClientPrivate
*
priv
=
RING_CLIENT_GET_PRIVATE
(
user_data
);
ring_about_dialog
(
priv
->
win
);
}
static
const
GActionEntry
ring_actions
[]
=
{
{
"accept"
,
NULL
,
NULL
,
NULL
,
NULL
,
{
0
}
},
{
"hangup"
,
NULL
,
NULL
,
NULL
,
NULL
,
{
0
}
},
{
"hold"
,
NULL
,
NULL
,
"false"
,
NULL
,
{
0
}
},
{
"quit"
,
action_quit
,
NULL
,
NULL
,
NULL
,
{
0
}
}
{
"accept"
,
NULL
,
NULL
,
NULL
,
NULL
,
{
0
}
},
{
"hangup"
,
NULL
,
NULL
,
NULL
,
NULL
,
{
0
}
},
{
"hold"
,
NULL
,
NULL
,
"false"
,
NULL
,
{
0
}
},
{
"quit"
,
action_quit
,
NULL
,
NULL
,
NULL
,
{
0
}
},
{
"about"
,
action_about
,
NULL
,
NULL
,
NULL
,
{
0
}
}
/* TODO implement the other actions */
// { "mute_audio", NULL, NULL, "false", NULL, {0} },
// { "mute_video", NULL, NULL, "false", NULL, {0} },
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment