Skip to content

Commit

Permalink
More fixes
Browse files Browse the repository at this point in the history
- desktop file had no name and the wrong icon
- get rid of selected item highlighting
  • Loading branch information
mtwebster committed Mar 22, 2024
1 parent fddbb08 commit 992ada1
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 29 deletions.
3 changes: 2 additions & 1 deletion data/gnome-online-accounts-gtk.desktop.in.in
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
[Desktop Entry]
Name=Gnome Online Accounts
Type=Application
Icon=applications-system-symbolic
Icon=cs-online-accounts
Exec=@bindir@/gnome-online-accounts-gtk
28 changes: 2 additions & 26 deletions src/gnome-online-accounts-gtk.c
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,6 @@ show_account_cb (GoaProvider *provider,
}
}

gtk_list_box_select_row (GTK_LIST_BOX (window->accounts_listbox), NULL);

g_error_free (error);
}

Expand Down Expand Up @@ -271,30 +269,8 @@ on_account_changed (GoaClient *client,
GoaObject *object,
gpointer user_data)
{
OaWindow *window = OA_WINDOW (user_data);
GtkListBoxRow *selected_row;
GoaObject *selected_object;
int position;

// FIXME: Not sure if we even need to react to account-changed, goa updates its own
// dialog, and the appearance in the list box isn't going to change. I think it may
// be weird to popup an account without the user triggering it.

selected_row = gtk_list_box_get_selected_row (GTK_LIST_BOX (window->accounts_listbox));
if (selected_row != NULL)
{
return;
}

position = gtk_list_box_row_get_index (selected_row);
selected_object = g_list_model_get_item (window->accounts_model, position);

if (selected_object == object)
{
show_account (window, object);
}

g_object_unref (selected_object);
// TODO: anything needed?
g_debug ("Account changed");
}

static GtkWidget *
Expand Down
4 changes: 2 additions & 2 deletions src/online-accounts.ui
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,9 @@
<property name="child">
<object class="GtkListBox" id="accounts_listbox">
<property name="focusable">1</property>
<property name="selection_mode">single</property>
<property name="selection_mode">none</property>
<property name="show-separators">1</property>
<signal name="row-selected" handler="on_account_row_activated" object="OaWindow" swapped="no"/>
<signal name="row-activated" handler="on_account_row_activated" object="OaWindow" swapped="no"/>
</object>
</property>
</object>
Expand Down

0 comments on commit 992ada1

Please sign in to comment.