Commit e9669d28 authored by Nicolas Jager's avatar Nicolas Jager

fix smartlist tabs behavior

Change-Id: I1d3c5c07e7ce8dfde44b905ed050ca4693a16500
parent ec53f024
......@@ -3,7 +3,6 @@ Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
Files: ic_history_black_24px.svg
ic_people_black_24px.svg
ic_question_answer_black_24px.svg
ic_verified_user_black_24px.svg
Copyright: 2014-2017 Material Design Authors
License: Apache-2.0
......
<svg fill="#000000" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg">
<path d="M0 0h24v24H0z" fill="none"/>
<path d="M12 1L3 5v6c0 5.55 3.84 10.74 9 12 5.16-1.26 9-6.45 9-12V5l-9-4zm-2 16l-4-4 1.41-1.41L10 14.17l6.59-6.59L18 9l-8 8z"/>
</svg>
\ No newline at end of file
......@@ -24,14 +24,13 @@
<file alias="quality">ic_high_quality_white_24px.svg</file>
<file alias="contacts_list">ic_people_black_24px.svg</file>
<file alias="conversations_list">ic_question_answer_black_24px.svg</file>
<file alias="contact_requests_list">ic_verified_user_black_24px.svg</file>
<file alias="contact_requests_list">ic_verified_user_black_24px_with_notification.svg</file>
<file alias="history_list">ic_history_black_24px.svg</file>
<file alias="add">add.svg</file>
<file alias="reject">reject.svg</file>
<file alias="block">block.svg</file>
<file alias="invite">ic_person_add_black_24px.svg</file>
<file alias="temporary-item">ic_search_black_48px.svg</file>
<file alias="contact_requests_list_with_notification">ic_verified_user_black_24px_with_notification.svg</file>
<file alias="audio_only_call_start">ic_call_black_24px.svg</file>
</gresource>
</gresources>
......@@ -99,7 +99,6 @@ struct RingMainWindowPrivate
GtkWidget *combobox_account_selector;
GtkWidget *treeview_contact_requests;
GtkWidget *scrolled_window_contact_requests;
GtkWidget *image_contact_requests_list;
GtkWidget *webkit_chat_container; ///< The webkit_chat_container is created once, then reused for all chat views
GSettings *settings;
......@@ -885,21 +884,13 @@ CppImpl::setPendingContactRequestTabIcon(RingMainWindow *win)
{
auto* priv = RING_MAIN_WINDOW_GET_PRIVATE(win);
if (not accountContainer_ or not priv->cpp->accountContainer_->info.contactModel->hasPendingRequests())
if (not accountContainer_)
return;
auto isRingAccount = accountContainer_->info.profileInfo.type == lrc::api::profile::Type::RING;
gtk_widget_set_visible(widgets->scrolled_window_contact_requests, isRingAccount);
auto hasPendingRequest = priv->cpp->accountContainer_->info.contactModel->hasPendingRequests();
if (not isRingAccount)
return;
gtk_notebook_set_show_tabs(GTK_NOTEBOOK(priv->notebook_contacts), true);
gtk_image_set_from_resource(GTK_IMAGE(widgets->image_contact_requests_list),
(accountContainer_->info.contactModel->hasPendingRequests())
? "/cx/ring/RingGnome/contact_requests_list_with_notification"
: "/cx/ring/RingGnome/contact_requests_list");
gtk_widget_set_visible(widgets->scrolled_window_contact_requests, hasPendingRequest);
gtk_notebook_set_show_tabs(GTK_NOTEBOOK(priv->notebook_contacts), hasPendingRequest);
}
void
......@@ -1459,7 +1450,6 @@ ring_main_window_class_init(RingMainWindowClass *klass)
gtk_widget_class_bind_template_child_private(GTK_WIDGET_CLASS (klass), RingMainWindow, radiobutton_account_settings);
gtk_widget_class_bind_template_child_private(GTK_WIDGET_CLASS (klass), RingMainWindow, combobox_account_selector);
gtk_widget_class_bind_template_child_private(GTK_WIDGET_CLASS (klass), RingMainWindow, scrolled_window_contact_requests);
gtk_widget_class_bind_template_child_private(GTK_WIDGET_CLASS (klass), RingMainWindow, image_contact_requests_list);
}
GtkWidget *
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment