mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-01-19 20:18:09 +00:00
Migrate contact_starred icons
This commit is contained in:
parent
b547a7845c
commit
6cbcade898
6 changed files with 12 additions and 21 deletions
|
|
@ -434,16 +434,12 @@ static void icon_press_handler(GtkEntry *entry){
|
|||
}
|
||||
|
||||
static void update_star(GtkEntry *entry, gboolean is_known){
|
||||
GdkPixbuf *active,*starred,*unstarred;
|
||||
active=gtk_entry_get_icon_pixbuf(entry,GTK_ENTRY_ICON_SECONDARY);
|
||||
starred=g_object_get_data(G_OBJECT(entry),"starred_icon");
|
||||
unstarred=g_object_get_data(G_OBJECT(entry),"unstarred_icon");
|
||||
if (is_known && (active==unstarred)){
|
||||
gtk_entry_set_icon_from_pixbuf(entry,GTK_ENTRY_ICON_SECONDARY,starred);
|
||||
if (is_known){
|
||||
gtk_entry_set_icon_from_icon_name(entry,GTK_ENTRY_ICON_SECONDARY,"linphone-contact-bookmarked");
|
||||
gtk_entry_set_icon_tooltip_text(GTK_ENTRY(entry),GTK_ENTRY_ICON_SECONDARY,NULL);
|
||||
}else if ((!is_known) && (active==starred)){
|
||||
}else{
|
||||
gtk_entry_set_icon_from_icon_name(entry,GTK_ENTRY_ICON_SECONDARY,"linphone-contact-not-bookmarked");
|
||||
gtk_entry_set_icon_tooltip_text(GTK_ENTRY(entry),GTK_ENTRY_ICON_SECONDARY,_("Add to addressbook"));
|
||||
gtk_entry_set_icon_from_pixbuf(entry,GTK_ENTRY_ICON_SECONDARY,unstarred);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -470,14 +466,7 @@ static void check_contact(GtkEditable *editable, LinphoneCore *lc){
|
|||
}
|
||||
|
||||
static void linphone_gtk_init_bookmark_icon(void){
|
||||
GtkWidget *mw=linphone_gtk_get_main_window();
|
||||
GtkWidget *entry=linphone_gtk_get_widget(mw,"uribar");
|
||||
GdkPixbuf *pbuf=create_pixbuf("contact_unstarred.png");
|
||||
gtk_entry_set_icon_from_pixbuf(GTK_ENTRY(entry),GTK_ENTRY_ICON_SECONDARY,pbuf);
|
||||
g_object_set_data_full(G_OBJECT(entry),"unstarred_icon",pbuf,g_object_unref);
|
||||
pbuf=create_pixbuf("contact_starred.png");
|
||||
g_object_set_data_full(G_OBJECT(entry),"starred_icon",pbuf,g_object_unref);
|
||||
gtk_entry_set_icon_activatable(GTK_ENTRY(entry),GTK_ENTRY_ICON_SECONDARY,TRUE);
|
||||
GtkWidget *entry = linphone_gtk_get_widget(linphone_gtk_get_main_window(), "uribar");
|
||||
g_signal_connect(G_OBJECT(entry),"icon-release",(GCallback)icon_press_handler,NULL);
|
||||
g_signal_connect(G_OBJECT(GTK_EDITABLE(entry)),"changed",(GCallback)check_contact,linphone_gtk_get_core());
|
||||
}
|
||||
|
|
|
|||
|
|
@ -346,8 +346,9 @@
|
|||
<property name="can_focus">True</property>
|
||||
<property name="invisible_char">●</property>
|
||||
<property name="invisible_char_set">True</property>
|
||||
<property name="secondary_icon_name">linphone-contact-not-bookmarked</property>
|
||||
<property name="primary_icon_activatable">False</property>
|
||||
<property name="secondary_icon_activatable">False</property>
|
||||
<property name="secondary_icon_activatable">True</property>
|
||||
<property name="primary_icon_sensitive">True</property>
|
||||
<property name="secondary_icon_sensitive">True</property>
|
||||
<signal name="activate" handler="linphone_gtk_uri_bar_activate" swapped="no"/>
|
||||
|
|
|
|||
|
|
@ -63,6 +63,8 @@ install(FILES
|
|||
linphone-chat-new-message-and-writing.png
|
||||
linphone-call-status-incoming.png
|
||||
linphone-call-status-outgoing.png
|
||||
linphone-contact-bookmarked.png
|
||||
linphone-contact-not-bookmarked.png
|
||||
DESTINATION ${ICONS_INSTALL_DIR}/48x48/status
|
||||
PERMISSIONS OWNER_WRITE OWNER_READ GROUP_READ WORLD_READ
|
||||
)
|
||||
|
|
|
|||
|
|
@ -2,10 +2,7 @@ pixmapdir=$(datadir)/pixmaps/linphone
|
|||
dist_pixmap_DATA= \
|
||||
hold_on.png hold_off.png \
|
||||
linphone.png linphone-banner.png \
|
||||
chat_message_inprogress.png chat_message_delivered.png chat_message_not_delivered.png\
|
||||
contact-orange.png history-orange.png\
|
||||
startcall-small.png stopcall-red.png stopcall-small.png linphone.icns \
|
||||
contact_starred.png contact_unstarred.png \
|
||||
ok.png \
|
||||
notok.png
|
||||
|
||||
|
|
@ -32,7 +29,9 @@ dist_status48icons_DATA= \
|
|||
linphone-chat-writing.png \
|
||||
linphone-chat-new-message-and-writing.png \
|
||||
linphone-call-status-incoming.png \
|
||||
linphone-call_status-outgoing.png
|
||||
linphone-call_status-outgoing.png \
|
||||
linphone-contact-bookmarked.png \
|
||||
linphone-contact-not-bookmarked.png
|
||||
|
||||
statussvgiconsdir=$(iconsdir)/scalable/status
|
||||
dist_statussvgicons_DATA= \
|
||||
|
|
|
|||
|
Before Width: | Height: | Size: 2.9 KiB After Width: | Height: | Size: 2.9 KiB |
|
Before Width: | Height: | Size: 2.8 KiB After Width: | Height: | Size: 2.8 KiB |
Loading…
Add table
Reference in a new issue