Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
jami-daemon
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
savoirfairelinux
jami-daemon
Commits
5c49e5e9
Commit
5c49e5e9
authored
13 years ago
by
Rafaël Carré
Browse files
Options
Downloads
Patches
Plain Diff
Don't give glib warnings if icons are not found
parent
2c6f37d1
No related branches found
No related tags found
No related merge requests found
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
gnome/src/imwindow.c
+20
-16
20 additions, 16 deletions
gnome/src/imwindow.c
gnome/src/imwindow.h
+0
-6
0 additions, 6 deletions
gnome/src/imwindow.h
gnome/src/mainwindow.c
+4
-1
4 additions, 1 deletion
gnome/src/mainwindow.c
gnome/src/uimanager.c
+7
-4
7 additions, 4 deletions
gnome/src/uimanager.c
with
31 additions
and
27 deletions
gnome/src/imwindow.c
+
20
−
16
View file @
5c49e5e9
...
@@ -38,11 +38,23 @@
...
@@ -38,11 +38,23 @@
#include
<imwindow.h>
#include
<imwindow.h>
#include
<contacts/calltab.h>
#include
<contacts/calltab.h>
#include
<contacts/calltab.h>
#include
<contacts/calltab.h>
#include
<sys/stat.h>
/** Local variables */
/** Local variables */
static
GtkWidget
*
im_window
=
NULL
;
static
GtkWidget
*
im_window
=
NULL
;
static
GtkWidget
*
im_notebook
=
NULL
;
static
GtkWidget
*
im_notebook
=
NULL
;
static
void
im_window_init
();
static
GtkWindow
*
im_window_get
()
{
if
(
im_window
==
NULL
)
im_window_init
();
return
GTK_WINDOW
(
im_window
);
}
static
gboolean
window_configure_cb
(
GtkWidget
*
wini
UNUSED
,
GdkEventConfigure
*
event
)
static
gboolean
window_configure_cb
(
GtkWidget
*
wini
UNUSED
,
GdkEventConfigure
*
event
)
{
{
int
pos_x
,
pos_y
;
int
pos_x
,
pos_y
;
...
@@ -50,7 +62,7 @@ static gboolean window_configure_cb (GtkWidget *wini UNUSED, GdkEventConfigure *
...
@@ -50,7 +62,7 @@ static gboolean window_configure_cb (GtkWidget *wini UNUSED, GdkEventConfigure *
eel_gconf_set_integer
(
CONF_IM_WINDOW_WIDTH
,
event
->
width
);
eel_gconf_set_integer
(
CONF_IM_WINDOW_WIDTH
,
event
->
width
);
eel_gconf_set_integer
(
CONF_IM_WINDOW_HEIGHT
,
event
->
height
);
eel_gconf_set_integer
(
CONF_IM_WINDOW_HEIGHT
,
event
->
height
);
gtk_window_get_position
(
GTK_WINDOW
(
im_window_get
()
)
,
&
pos_x
,
&
pos_y
);
gtk_window_get_position
(
im_window_get
(),
&
pos_x
,
&
pos_y
);
eel_gconf_set_integer
(
CONF_IM_WINDOW_POSITION_X
,
pos_x
);
eel_gconf_set_integer
(
CONF_IM_WINDOW_POSITION_X
,
pos_x
);
eel_gconf_set_integer
(
CONF_IM_WINDOW_POSITION_Y
,
pos_y
);
eel_gconf_set_integer
(
CONF_IM_WINDOW_POSITION_Y
,
pos_y
);
...
@@ -106,6 +118,8 @@ im_window_init()
...
@@ -106,6 +118,8 @@ im_window_init()
gtk_container_set_border_width
(
GTK_CONTAINER
(
im_window
),
0
);
gtk_container_set_border_width
(
GTK_CONTAINER
(
im_window
),
0
);
gtk_window_set_title
(
GTK_WINDOW
(
im_window
),
window_title
);
gtk_window_set_title
(
GTK_WINDOW
(
im_window
),
window_title
);
gtk_window_set_default_size
(
GTK_WINDOW
(
im_window
),
width
,
height
);
gtk_window_set_default_size
(
GTK_WINDOW
(
im_window
),
width
,
height
);
struct
stat
st
;
if
(
!
stat
(
LOGO
,
&
st
))
gtk_window_set_default_icon_from_file
(
LOGO
,
NULL
);
gtk_window_set_default_icon_from_file
(
LOGO
,
NULL
);
gtk_window_set_position
(
GTK_WINDOW
(
im_window
),
GTK_WIN_POS_MOUSE
);
gtk_window_set_position
(
GTK_WINDOW
(
im_window
),
GTK_WIN_POS_MOUSE
);
...
@@ -129,20 +143,9 @@ im_window_init()
...
@@ -129,20 +143,9 @@ im_window_init()
gtk_window_move
(
GTK_WINDOW
(
im_window
),
position_x
,
position_y
);
gtk_window_move
(
GTK_WINDOW
(
im_window
),
position_x
,
position_y
);
}
}
GtkWidget
*
im_window_get
()
{
if
(
im_window
==
NULL
)
im_window_init
();
return
im_window
;
}
gboolean
gboolean
im_window_is_active
()
im_window_is_active
()
{
{
if
(
!
im_window
)
if
(
!
im_window
)
return
FALSE
;
return
FALSE
;
else
else
...
@@ -152,13 +155,14 @@ im_window_is_active ()
...
@@ -152,13 +155,14 @@ im_window_is_active ()
gboolean
gboolean
im_window_is_visible
()
im_window_is_visible
()
{
{
return
gtk_widget_get_visible
(
im_window
);
return
gtk_widget_get_visible
(
GTK_WIDGET
(
im_window
_get
())
);
}
}
void
void
im_window_show
()
im_window_show
()
{
{
gtk_window_present
(
GTK_WINDOW
(
im_window_get
())
)
;
gtk_window_present
(
im_window_get
());
}
}
void
void
...
@@ -169,7 +173,7 @@ im_window_add (GtkWidget *widget)
...
@@ -169,7 +173,7 @@ im_window_add (GtkWidget *widget)
im_window_add_tab
(
widget
);
im_window_add_tab
(
widget
);
/* Show it all */
/* Show it all */
gtk_widget_show_all
(
im_window
);
gtk_widget_show_all
(
GTK_WIDGET
(
im_window
_get
())
);
}
}
else
{
else
{
ERROR
(
"InstantMessaging: Error: Could not create the main instant messaging window"
);
ERROR
(
"InstantMessaging: Error: Could not create the main instant messaging window"
);
...
...
This diff is collapsed.
Click to expand it.
gnome/src/imwindow.h
+
0
−
6
View file @
5c49e5e9
...
@@ -42,12 +42,6 @@
...
@@ -42,12 +42,6 @@
* @brief The IM window of the client.
* @brief The IM window of the client.
*/
*/
/*! @function
* Display the IM window
* @return GtkWidget* The IM window
*/
GtkWidget
*
im_window_get
();
/*! @function
/*! @function
@abstract Add IM widget to the IM window
@abstract Add IM widget to the IM window
*/
*/
...
...
This diff is collapsed.
Click to expand it.
gnome/src/mainwindow.c
+
4
−
1
View file @
5c49e5e9
...
@@ -44,6 +44,7 @@
...
@@ -44,6 +44,7 @@
#include
<widget/minidialog.h>
#include
<widget/minidialog.h>
#include
"uimanager.h"
#include
"uimanager.h"
#include
<sys/stat.h>
#include
<gtk/gtk.h>
#include
<gtk/gtk.h>
#include
<eel-gconf-extensions.h>
#include
<eel-gconf-extensions.h>
...
@@ -200,6 +201,8 @@ create_main_window ()
...
@@ -200,6 +201,8 @@ create_main_window ()
gtk_container_set_border_width
(
GTK_CONTAINER
(
window
),
0
);
gtk_container_set_border_width
(
GTK_CONTAINER
(
window
),
0
);
gtk_window_set_title
(
GTK_WINDOW
(
window
),
window_title
);
gtk_window_set_title
(
GTK_WINDOW
(
window
),
window_title
);
gtk_window_set_default_size
(
GTK_WINDOW
(
window
),
width
,
height
);
gtk_window_set_default_size
(
GTK_WINDOW
(
window
),
width
,
height
);
struct
stat
st
;
if
(
!
stat
(
LOGO
,
&
st
))
gtk_window_set_default_icon_from_file
(
LOGO
,
NULL
);
gtk_window_set_default_icon_from_file
(
LOGO
,
NULL
);
gtk_window_set_position
(
GTK_WINDOW
(
window
)
,
GTK_WIN_POS_MOUSE
);
gtk_window_set_position
(
GTK_WINDOW
(
window
)
,
GTK_WIN_POS_MOUSE
);
...
...
This diff is collapsed.
Click to expand it.
gnome/src/uimanager.c
+
7
−
4
View file @
5c49e5e9
...
@@ -53,6 +53,8 @@
...
@@ -53,6 +53,8 @@
#include
"accountlist.h"
#include
"accountlist.h"
#include
"config/accountlistconfigdialog.h"
#include
"config/accountlistconfigdialog.h"
#include
<sys/stat.h>
void
show_edit_number
(
callable_obj_t
*
call
);
void
show_edit_number
(
callable_obj_t
*
call
);
static
GtkWidget
*
toolbar
;
static
GtkWidget
*
toolbar
;
...
@@ -1731,11 +1733,12 @@ show_edit_number (callable_obj_t *call)
...
@@ -1731,11 +1733,12 @@ show_edit_number (callable_obj_t *call)
}
}
GtkWidget
*
static
GtkWidget
*
create_waiting_icon
()
create_waiting_icon
()
{
{
GtkWidget
*
waiting_icon
;
GtkWidget
*
waiting_icon
=
gtk_image_menu_item_new_with_label
(
""
);
waiting_icon
=
gtk_image_menu_item_new_with_label
(
""
);
struct
stat
st
;
if
(
!
stat
(
ICONS_DIR
"/wait-on.gif"
,
&
st
))
gtk_image_menu_item_set_image
(
GTK_IMAGE_MENU_ITEM
(
waiting_icon
),
gtk_image_menu_item_set_image
(
GTK_IMAGE_MENU_ITEM
(
waiting_icon
),
gtk_image_new_from_animation
(
gdk_pixbuf_animation_new_from_file
(
gtk_image_new_from_animation
(
gdk_pixbuf_animation_new_from_file
(
ICONS_DIR
"/wait-on.gif"
,
NULL
)));
ICONS_DIR
"/wait-on.gif"
,
NULL
)));
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment