Skip to content
Snippets Groups Projects
Commit fb7ecef4 authored by Eric Koegel's avatar Eric Koegel
Browse files

Settings: Select the device-id

When the device-id is selected after the window is open, switch
to the devices tab and select it.
parent dac971a6
No related branches found
No related tags found
No related merge requests found
...@@ -147,6 +147,12 @@ xfpm_settings_app_launch (GApplication *app) ...@@ -147,6 +147,12 @@ xfpm_settings_app_launch (GApplication *app)
DBG("window already opened, presenting it"); DBG("window already opened, presenting it");
gtk_window_present (GTK_WINDOW (windows->data)); gtk_window_present (GTK_WINDOW (windows->data));
gdk_notify_startup_complete (); gdk_notify_startup_complete ();
if (priv->device_id != NULL)
{
xfpm_settings_show_device_id (priv->device_id);
}
return; return;
} }
......
...@@ -2387,3 +2387,31 @@ xfpm_settings_dialog_new (XfconfChannel *channel, gboolean auth_suspend, ...@@ -2387,3 +2387,31 @@ xfpm_settings_dialog_new (XfconfChannel *channel, gboolean auth_suspend,
return dialog; return dialog;
} }
void
xfpm_settings_show_device_id (gchar *device_id)
{
GtkTreeIter *device_iter;
if (device_id == NULL)
return;
gtk_widget_show (gtk_notebook_get_nth_page (GTK_NOTEBOOK (nt), devices_page_num));
gtk_notebook_set_current_page (GTK_NOTEBOOK (nt), devices_page_num);
DBG("device_id %s", device_id);
device_iter = find_device_in_tree (device_id);
if (device_iter)
{
GtkTreeSelection *selection;
DBG("device found");
selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (sideview));
gtk_tree_selection_select_iter (selection, device_iter);
view_cursor_changed_cb (GTK_TREE_VIEW (sideview), NULL);
gtk_tree_iter_free (device_iter);
}
}
...@@ -39,4 +39,6 @@ GtkWidget *xfpm_settings_dialog_new (XfconfChannel *channel, ...@@ -39,4 +39,6 @@ GtkWidget *xfpm_settings_dialog_new (XfconfChannel *channel,
Window id, Window id,
gchar *device_id); gchar *device_id);
void xfpm_settings_show_device_id (gchar *device_id);
#endif /* __XFPM_SETTINGS_H */ #endif /* __XFPM_SETTINGS_H */
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment