Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
J
jami-daemon
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
129
Issues
129
List
Boards
Labels
Service Desk
Milestones
Iterations
Requirements
Requirements
List
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Operations
Operations
Incidents
Analytics
Analytics
Insights
Issue
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
savoirfairelinux
jami-daemon
Commits
0f9267d3
Commit
0f9267d3
authored
Mar 25, 2008
by
Emmanuel Milou
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Open the accounts settings in an other window
parent
ab48f777
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
56 additions
and
13 deletions
+56
-13
sflphone-gtk/src/configwindow.c
sflphone-gtk/src/configwindow.c
+42
-13
sflphone-gtk/src/configwindow.h
sflphone-gtk/src/configwindow.h
+1
-0
sflphone-gtk/src/menus.c
sflphone-gtk/src/menus.c
+13
-0
No files found.
sflphone-gtk/src/configwindow.c
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
));
}
sflphone-gtk/src/configwindow.h
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
sflphone-gtk/src/menus.c
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"
,
...
...
Write
Preview
Markdown
is supported
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