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
37b76ff1
Commit
37b76ff1
authored
13 years ago
by
Tristan Matthews
Browse files
Options
Downloads
Patches
Plain Diff
* #9490: update account_config_list_dialog status bar on status update
parent
1b2fdecd
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
gnome/src/config/accountlistconfigdialog.c
+38
-23
38 additions, 23 deletions
gnome/src/config/accountlistconfigdialog.c
gnome/src/config/accountlistconfigdialog.h
+6
-4
6 additions, 4 deletions
gnome/src/config/accountlistconfigdialog.h
gnome/src/dbus/dbus.c
+7
-1
7 additions, 1 deletion
gnome/src/dbus/dbus.c
with
51 additions
and
28 deletions
gnome/src/config/accountlistconfigdialog.c
+
38
−
23
View file @
37b76ff1
...
...
@@ -204,27 +204,7 @@ select_account_cb(GtkTreeSelection *selection, GtkTreeModel *model)
gtk_widget_set_sensitive
(
delete_button
,
TRUE
);
/* Update status bar about current registration state */
gtk_statusbar_pop
(
GTK_STATUSBAR
(
account_list_status_bar
),
CONTEXT_ID_REGISTRATION
);
const
gchar
*
state_name
=
account_state_name
(
selected_account
->
state
);
if
(
selected_account
->
protocol_state_description
!=
NULL
&&
selected_account
->
protocol_state_code
!=
0
)
{
gchar
*
response
=
g_strdup_printf
(
_
(
"Server returned
\"
%s
\"
(%d)"
),
selected_account
->
protocol_state_description
,
selected_account
->
protocol_state_code
);
gchar
*
message
=
g_strconcat
(
state_name
,
". "
,
response
,
NULL
);
gtk_statusbar_push
(
GTK_STATUSBAR
(
account_list_status_bar
),
CONTEXT_ID_REGISTRATION
,
message
);
g_free
(
response
);
g_free
(
message
);
}
else
{
gtk_statusbar_push
(
GTK_STATUSBAR
(
account_list_status_bar
),
CONTEXT_ID_REGISTRATION
,
state_name
);
}
update_account_list_status_bar
(
selected_account
);
}
else
{
gtk_widget_set_sensitive
(
move_up_button
,
FALSE
);
gtk_widget_set_sensitive
(
move_down_button
,
FALSE
);
...
...
@@ -484,8 +464,7 @@ create_account_list()
renderer
=
gtk_cell_renderer_text_new
();
tree_view_column
=
gtk_tree_view_column_new_with_attributes
(
_
(
"Status"
),
renderer
,
"markup"
,
COLUMN_ACCOUNT_STATUS
,
NULL
);
"markup"
,
COLUMN_ACCOUNT_STATUS
,
NULL
);
gtk_tree_view_append_column
(
GTK_TREE_VIEW
(
tree_view
),
tree_view_column
);
// Highlight IP profile
gtk_tree_view_column_set_cell_data_func
(
tree_view_column
,
renderer
,
...
...
@@ -566,6 +545,32 @@ create_account_list()
return
table
;
}
void
update_account_list_status_bar
(
account_t
*
account
)
{
if
(
!
account
||
!
account_list_status_bar
)
return
;
/* Update status bar about current registration state */
gtk_statusbar_pop
(
GTK_STATUSBAR
(
account_list_status_bar
),
CONTEXT_ID_REGISTRATION
);
const
gchar
*
state_name
=
account_state_name
(
account
->
state
);
if
(
account
->
protocol_state_description
!=
NULL
&&
account
->
protocol_state_code
!=
0
)
{
gchar
*
response
=
g_strdup_printf
(
_
(
"Server returned
\"
%s
\"
(%d)"
),
account
->
protocol_state_description
,
account
->
protocol_state_code
);
gchar
*
message
=
g_strconcat
(
state_name
,
". "
,
response
,
NULL
);
gtk_statusbar_push
(
GTK_STATUSBAR
(
account_list_status_bar
),
CONTEXT_ID_REGISTRATION
,
message
);
g_free
(
response
);
g_free
(
message
);
}
else
{
gtk_statusbar_push
(
GTK_STATUSBAR
(
account_list_status_bar
),
CONTEXT_ID_REGISTRATION
,
state_name
);
}
}
void
show_account_list_config_dialog
(
void
)
{
account_list_dialog
=
GTK_DIALOG
(
gtk_dialog_new_with_buttons
(
_
(
"Accounts"
),
...
...
@@ -611,7 +616,17 @@ void show_account_list_config_dialog(void)
status_bar_display_account
();
gtk_widget_destroy
(
GTK_WIDGET
(
account_list_dialog
));
/* Invalidate static pointers */
account_list_dialog
=
NULL
;
account_list_status_bar
=
NULL
;
edit_button
=
NULL
;
delete_button
=
NULL
;
move_down_button
=
NULL
;
move_up_button
=
NULL
;
gtk_list_store_clear
(
account_store
);
account_store
=
NULL
;
update_actions
();
}
This diff is collapsed.
Click to expand it.
gnome/src/config/accountlistconfigdialog.h
+
6
−
4
View file @
37b76ff1
...
...
@@ -29,10 +29,12 @@
*/
#ifndef __SFL_ACCOUNTLISTDIALOG_H__
#define __SFL_ACCOUNTLISTDIALOG_H__
#ifndef ACCOUNTLISTDIALOG_H_
#define ACCOUNTLISTDIALOG_H_
#include
"accountlist.h"
void
show_account_list_config_dialog
(
void
);
void
account_store_fill
(
void
);
void
update_account_list_status_bar
(
account_t
*
account
);
#endif
#endif
// ACCOUNTLISTDIALOG_H_
This diff is collapsed.
Click to expand it.
gnome/src/dbus/dbus.c
+
7
−
1
View file @
37b76ff1
...
...
@@ -29,7 +29,10 @@
* shall include the source code for the parts of OpenSSL used as well
* as that of the covered work.
*/
#ifdef HAVE_CONFIG_H
#include
"config.h"
#endif
#include
<glib/gi18n.h>
#include
"str_utils.h"
#include
"logger.h"
...
...
@@ -43,6 +46,7 @@
#include
"sliders.h"
#include
"statusicon.h"
#include
"assistant.h"
#include
"accountlistconfigdialog.h"
#include
"dbus.h"
#include
"actions.h"
...
...
@@ -428,8 +432,10 @@ registration_state_changed_cb(DBusGProxy *proxy UNUSED, const gchar *accountID,
DEBUG
(
"DBus: Registration state changed to %s for account %s"
,
account_state_name
(
state
),
accountID
);
account_t
*
acc
=
account_list_get_by_id
(
accountID
);
if
(
acc
)
if
(
acc
)
{
acc
->
state
=
state
;
update_account_list_status_bar
(
acc
);
}
}
static
void
...
...
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