Patch from JRB for 88443

2002-08-07  Jody Goldberg <jody@gnome.org>
	Patch from JRB for 88443

	* theme-switcher.c (read_themes) : store the current cursor

2002-08-07  Jody Goldberg <jody@gnome.org>

	* mime-edit-dialog.c (mime_edit_dialog_get_app) : Be extra anal, just
	  in case the db is corrupt.
This commit is contained in:
Jody Goldberg 2002-08-07 17:06:12 +00:00 committed by Jody Goldberg
parent 97c9f86f49
commit fe247b1685
4 changed files with 25 additions and 26 deletions

View file

@ -1,3 +1,8 @@
2002-08-07 Jody Goldberg <jody@gnome.org>
* mime-edit-dialog.c (mime_edit_dialog_get_app) : Be extra anal, just
in case the db is corrupt.
2002-08-05 Jody Goldberg <jody@gnome.org>
* mime-edit-dialog.c (mime_edit_dialog_get_app) : work around

View file

@ -702,7 +702,7 @@ mime_edit_dialog_get_app (GladeXML *glade, char const *mime_type,
/* Look for a matching application (with or without path) */
if (app_cmd != NULL &&
(!strcmp (cmd, app_cmd) || !strcmp (base_cmd, app_cmd))) {
(!strcmp (cmd, app_cmd) || (*base_cmd && !strcmp (base_cmd, app_cmd)))) {
gboolean ok, app_req = gnome_vfs_application_registry_get_bool_value (ptr->data,
GNOME_VFS_APPLICATION_REGISTRY_REQUIRES_TERMINAL, &ok);
if (ok && app_req == requires_terminal)

View file

@ -1,3 +1,8 @@
2002-08-07 Jody Goldberg <jody@gnome.org>
Patch from JRB for 88443
* theme-switcher.c (read_themes) : store the current cursor
2002-07-31 Federico Mena Quintero <federico@ximian.com>
* theme-install.glade: Make the file entry modal. Fixes #89410.

View file

@ -141,18 +141,9 @@ read_themes (GladeXML *dialog)
if (strcmp (current_theme, info->name) == 0)
{
GtkTreeSelection *selection;
selection = gtk_tree_view_get_selection (tree_view);
gtk_tree_selection_select_iter (selection, &iter);
if (initial_scroll)
{
GtkTreePath *path;
path = gtk_tree_model_get_path (model, &iter);
row_ref = gtk_tree_row_reference_new (model, path);
gtk_tree_path_free (path);
}
GtkTreePath *path = gtk_tree_model_get_path (model, &iter);
row_ref = gtk_tree_row_reference_new (model, path);
gtk_tree_path_free (path);
current_theme_found = TRUE;
}
@ -169,36 +160,34 @@ read_themes (GladeXML *dialog)
if (! current_theme_found)
{
GtkTreeSelection *selection = gtk_tree_view_get_selection (tree_view);
GtkTreeIter iter;
GtkTreePath *path;
gtk_list_store_prepend (GTK_LIST_STORE (model), &iter);
gtk_list_store_set (GTK_LIST_STORE (model), &iter,
THEME_NAME_COLUMN, current_theme,
-1);
gtk_tree_selection_select_iter (selection, &iter);
if (initial_scroll)
{
GtkTreePath *path;
path = gtk_tree_model_get_path (model, &iter);
row_ref = gtk_tree_row_reference_new (model, path);
gtk_tree_path_free (path);
}
path = gtk_tree_model_get_path (model, &iter);
row_ref = gtk_tree_row_reference_new (model, path);
gtk_tree_path_free (path);
}
if (row_ref && initial_scroll)
if (row_ref)
{
GtkTreePath *path;
path = gtk_tree_row_reference_get_path (row_ref);
gtk_tree_view_set_cursor (tree_view,path, NULL, FALSE);
gtk_tree_view_scroll_to_cell (tree_view, path, NULL, TRUE, 0.5, 0.0);
if (initial_scroll)
{
gtk_tree_view_scroll_to_cell (tree_view, path, NULL, TRUE, 0.5, 0.0);
initial_scroll = FALSE;
}
gtk_tree_path_free (path);
gtk_tree_row_reference_free (row_ref);
initial_scroll = FALSE;
}
setting_model = FALSE;