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
0f9267d3
Commit
0f9267d3
authored
17 years ago
by
Emmanuel Milou
Browse files
Options
Downloads
Patches
Plain Diff
Open the accounts settings in an other window
parent
ab48f777
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
sflphone-gtk/src/configwindow.c
+42
-13
42 additions, 13 deletions
sflphone-gtk/src/configwindow.c
sflphone-gtk/src/configwindow.h
+1
-0
1 addition, 0 deletions
sflphone-gtk/src/configwindow.h
sflphone-gtk/src/menus.c
+13
-0
13 additions, 0 deletions
sflphone-gtk/src/menus.c
with
56 additions
and
13 deletions
sflphone-gtk/src/configwindow.c
+
42
−
13
View file @
0f9267d3
...
...
@@ -850,24 +850,16 @@ create_accounts_tab()
GtkCellRenderer
*
renderer
;
GtkTreeViewColumn
*
treeViewColumn
;
GtkTreeSelection
*
treeSelection
;
GtkWidget
*
accountsFrame
;
selectedAccount
=
NULL
;
ret
=
gtk_vbox_new
(
FALSE
,
10
);
gtk_container_set_border_width
(
GTK_CONTAINER
(
ret
),
10
);
accountsFrame
=
gtk_frame_new
(
_
(
"Accounts previously setup."
));
gtk_box_pack_start
(
GTK_BOX
(
ret
),
accountsFrame
,
TRUE
,
TRUE
,
0
);
gtk_widget_show_all
(
accountsFrame
);
scrolledWindow
=
gtk_scrolled_window_new
(
NULL
,
NULL
);
gtk_scrolled_window_set_policy
(
GTK_SCROLLED_WINDOW
(
scrolledWindow
),
GTK_POLICY_AUTOMATIC
,
GTK_POLICY_AUTOMATIC
);
gtk_scrolled_window_set_shadow_type
(
GTK_SCROLLED_WINDOW
(
scrolledWindow
),
GTK_SHADOW_IN
);
gtk_box_pack_start
(
GTK_BOX
(
accountsFrame
),
scrolledWindow
,
TRUE
,
TRUE
,
0
);
gtk_container_add
(
GTK_CONTAINER
(
accountsFrame
)
,
scrolledWindow
);
gtk_box_pack_start
(
GTK_BOX
(
ret
),
scrolledWindow
,
TRUE
,
TRUE
,
0
);
accountStore
=
gtk_list_store_new
(
4
,
G_TYPE_STRING
,
// Name
...
...
@@ -877,7 +869,6 @@ create_accounts_tab()
);
treeView
=
gtk_tree_view_new_with_model
(
GTK_TREE_MODEL
(
accountStore
));
//gtk_widget_set_tooltip_text( GTK_WIDGET( treeView ) , _("Double-click to edit the information on this account"));
treeSelection
=
gtk_tree_view_get_selection
(
GTK_TREE_VIEW
(
treeView
));
g_signal_connect
(
G_OBJECT
(
treeSelection
),
"changed"
,
G_CALLBACK
(
select_account
),
...
...
@@ -1167,9 +1158,9 @@ show_config_window ()
gtk_widget_show
(
notebook
);
// Accounts tab
tab
=
create_accounts_tab
();
gtk_notebook_append_page
(
GTK_NOTEBOOK
(
notebook
),
tab
,
gtk_label_new
(
_
(
"Accounts"
)));
gtk_notebook_page_num
(
GTK_NOTEBOOK
(
notebook
),
tab
);
//
tab = create_accounts_tab();
//
gtk_notebook_append_page(GTK_NOTEBOOK(notebook), tab, gtk_label_new(_("Accounts")));
//
gtk_notebook_page_num(GTK_NOTEBOOK(notebook), tab);
// Audio tab
tab
=
create_audio_tab
();
...
...
@@ -1184,3 +1175,41 @@ show_config_window ()
gtk_widget_destroy
(
GTK_WIDGET
(
dialog
));
}
/*
* Show accounts tab in a different window
*/
void
show_accounts_window
(
void
)
{
GtkDialog
*
dialog
;
GtkWidget
*
accountFrame
;
GtkWidget
*
tab
;
dialogOpen
=
TRUE
;
dialog
=
GTK_DIALOG
(
gtk_dialog_new_with_buttons
(
_
(
"Accounts"
),
GTK_WINDOW
(
get_main_window
()),
GTK_DIALOG_DESTROY_WITH_PARENT
,
GTK_STOCK_CLOSE
,
GTK_RESPONSE_ACCEPT
,
NULL
));
// Set window properties
gtk_dialog_set_has_separator
(
dialog
,
FALSE
);
gtk_window_set_default_size
(
GTK_WINDOW
(
dialog
),
400
,
400
);
gtk_container_set_border_width
(
GTK_CONTAINER
(
dialog
),
0
);
accountFrame
=
gtk_frame_new
(
_
(
"Accounts previously setup"
));
gtk_box_pack_start
(
GTK_BOX
(
dialog
->
vbox
),
accountFrame
,
TRUE
,
TRUE
,
0
);
gtk_container_set_border_width
(
GTK_CONTAINER
(
accountFrame
),
10
);
gtk_widget_show
(
accountFrame
);
// Accounts tab
tab
=
create_accounts_tab
();
gtk_container_add
(
GTK_CONTAINER
(
accountFrame
)
,
tab
);
gtk_dialog_run
(
dialog
);
dialogOpen
=
FALSE
;
gtk_widget_destroy
(
GTK_WIDGET
(
dialog
));
}
This diff is collapsed.
Click to expand it.
sflphone-gtk/src/configwindow.h
+
1
−
0
View file @
0f9267d3
...
...
@@ -42,5 +42,6 @@ GtkWidget * create_codec_table();
GtkWidget
*
create_accounts_tab
();
GtkWidget
*
create_audio_tab
();
void
show_config_window
();
void
show_accounts_window
();
#endif
This diff is collapsed.
Click to expand it.
sflphone-gtk/src/menus.c
+
13
−
0
View file @
0f9267d3
...
...
@@ -264,6 +264,12 @@ edit_preferences ( void * foo)
show_config_window
();
}
static
void
edit_accounts
(
void
*
foo
)
{
show_accounts_window
();
}
// The menu Edit/Copy should copy the current selected call's number
static
void
edit_copy
(
void
*
foo
)
...
...
@@ -414,6 +420,13 @@ create_edit_menu()
menu_items
=
gtk_separator_menu_item_new
();
gtk_menu_shell_append
(
GTK_MENU_SHELL
(
menu
),
menu_items
);
menu_items
=
gtk_menu_item_new_with_mnemonic
(
_
(
"_Accounts"
)
);
gtk_menu_shell_append
(
GTK_MENU_SHELL
(
menu
),
menu_items
);
g_signal_connect_swapped
(
G_OBJECT
(
menu_items
),
"activate"
,
G_CALLBACK
(
edit_accounts
),
NULL
);
gtk_widget_show
(
menu_items
);
menu_items
=
gtk_image_menu_item_new_from_stock
(
GTK_STOCK_PREFERENCES
,
get_accel_group
());
gtk_menu_shell_append
(
GTK_MENU_SHELL
(
menu
),
menu_items
);
g_signal_connect_swapped
(
G_OBJECT
(
menu_items
),
"activate"
,
...
...
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