New upstream version 2.2.10
Fabio Fantoni
1 year, 10 months ago
37 | 37 | fi |
38 | 38 | |
39 | 39 | jobs: |
40 | "mint20": | |
40 | "mint": | |
41 | 41 | <<: *shared |
42 | 42 | docker: |
43 | - image: linuxmintd/mint20-amd64 | |
43 | - image: linuxmintd/mint21-amd64 | |
44 | 44 | |
45 | "lmde4": | |
45 | "lmde": | |
46 | 46 | <<: *shared |
47 | 47 | docker: |
48 | - image: linuxmintd/lmde4-amd64 | |
48 | - image: linuxmintd/lmde5-amd64 | |
49 | 49 | |
50 | 50 | workflows: |
51 | 51 | version: 2 |
52 | 52 | build: |
53 | 53 | jobs: |
54 | - "mint20" | |
55 | - "lmde4" | |
54 | - "mint" | |
55 | - "lmde" |
1836 | 1836 | else |
1837 | 1837 | { |
1838 | 1838 | g_free (priv->current_text); |
1839 | priv->current_text = g_strdup (search_text); | |
1839 | priv->current_text = g_utf8_strdown (search_text, -1); | |
1840 | 1840 | |
1841 | 1841 | gtk_widget_show (priv->loading_bar); |
1842 | 1842 | |
1846 | 1846 | { |
1847 | 1847 | if (priv->allow_paths) |
1848 | 1848 | { |
1849 | search_path (dialog, search_text, priv->search_icon_store); | |
1849 | search_path (dialog, priv->current_text, priv->search_icon_store); | |
1850 | 1850 | } |
1851 | 1851 | } |
1852 | 1852 | else |
1853 | 1853 | { |
1854 | search_icon_name (dialog, search_text, priv->search_icon_store); | |
1854 | search_icon_name (dialog, priv->current_text, priv->search_icon_store); | |
1855 | 1855 | } |
1856 | 1856 | } |
1857 | 1857 | } |
638 | 638 | return GDK_EVENT_PROPAGATE; |
639 | 639 | } |
640 | 640 | |
641 | static void | |
641 | static gboolean | |
642 | 642 | on_gtk_status_icon_button_release (GtkStatusIcon *status_icon, |
643 | 643 | GdkEvent *event, |
644 | 644 | gpointer user_data) |
685 | 685 | button, |
686 | 686 | _time, |
687 | 687 | orientation); |
688 | ||
689 | return GDK_EVENT_PROPAGATE; | |
690 | } | |
691 | ||
692 | static gboolean | |
693 | on_gtk_status_icon_scroll (GtkStatusIcon *status_icon, | |
694 | GdkEvent *event, | |
695 | gpointer user_data) | |
696 | { | |
697 | XAppStatusIcon *icon = user_data; | |
698 | guint _time; | |
699 | ||
700 | _time = event->scroll.time; | |
701 | GdkScrollDirection direction; | |
702 | ||
703 | ||
704 | if (gdk_event_get_scroll_direction (event, &direction)) | |
705 | { | |
706 | XAppScrollDirection x_dir = XAPP_SCROLL_UP; | |
707 | gint delta = 0; | |
708 | ||
709 | if (direction != GDK_SCROLL_SMOOTH) { | |
710 | if (direction == GDK_SCROLL_UP) | |
711 | { | |
712 | x_dir = XAPP_SCROLL_UP; | |
713 | delta = -1; | |
714 | } | |
715 | else if (direction == GDK_SCROLL_DOWN) | |
716 | { | |
717 | x_dir = XAPP_SCROLL_DOWN; | |
718 | delta = 1; | |
719 | } | |
720 | else if (direction == GDK_SCROLL_LEFT) | |
721 | { | |
722 | x_dir = XAPP_SCROLL_LEFT; | |
723 | delta = -1; | |
724 | } | |
725 | else if (direction == GDK_SCROLL_RIGHT) | |
726 | { | |
727 | x_dir = XAPP_SCROLL_RIGHT; | |
728 | delta = 1; | |
729 | } | |
730 | } | |
731 | ||
732 | DEBUG ("Received Scroll from GtkStatusIcon %s: " | |
733 | "delta: %d , direction: %s , time: %u", | |
734 | gtk_status_icon_get_title (status_icon), | |
735 | delta, direction_to_str (direction), _time); | |
736 | ||
737 | g_signal_emit(icon, signals[SCROLL], 0, | |
738 | delta, | |
739 | x_dir, | |
740 | _time); | |
741 | } | |
742 | ||
743 | return GDK_EVENT_PROPAGATE; | |
688 | 744 | } |
689 | 745 | |
690 | 746 | static void |
968 | 1024 | g_signal_connect (priv->gtk_status_icon, |
969 | 1025 | "button-release-event", |
970 | 1026 | G_CALLBACK (on_gtk_status_icon_button_release), |
1027 | self); | |
1028 | g_signal_connect (priv->gtk_status_icon, | |
1029 | "scroll-event", | |
1030 | G_CALLBACK (on_gtk_status_icon_scroll), | |
971 | 1031 | self); |
972 | 1032 | g_signal_connect (priv->gtk_status_icon, |
973 | 1033 | "notify::embedded", |
0 | 0 | project('xapp', |
1 | 1 | 'c', |
2 | version : '2.2.8', | |
2 | version : '2.2.10', | |
3 | 3 | default_options : [ 'buildtype=debugoptimized' ], |
4 | 4 | ) |
5 | 5 |
53 | 53 | gboolean update_tooltip; |
54 | 54 | gboolean update_menu; |
55 | 55 | gboolean update_icon; |
56 | gboolean update_id; | |
56 | 57 | } SnItemPropertiesResult; |
57 | 58 | |
58 | 59 | struct _SnItem |
889 | 890 | new_props->update_icon = TRUE; |
890 | 891 | } |
891 | 892 | } |
893 | if (g_strcmp0 (name, "Id") == 0) | |
894 | { | |
895 | new_props->id = null_or_string_from_variant (value); | |
896 | new_props->update_id = TRUE; | |
897 | } | |
892 | 898 | } |
893 | 899 | |
894 | 900 | g_variant_iter_free (iter); |
912 | 918 | if (new_props->update_icon || new_props->update_status) |
913 | 919 | { |
914 | 920 | update_icon (item, new_props); |
921 | } | |
922 | ||
923 | if (new_props->update_id || new_props->update_status) | |
924 | { | |
925 | assign_sortable_name (item, new_props->id); | |
915 | 926 | } |
916 | 927 | |
917 | 928 | props_free (item->current_props); |
970 | 981 | } |
971 | 982 | |
972 | 983 | if (g_strcmp0 (signal_name, "NewIcon") == 0 || |
984 | g_strcmp0 (signal_name, "Id") == 0 || | |
973 | 985 | g_strcmp0 (signal_name, "NewAttentionIcon") == 0 || |
974 | 986 | g_strcmp0 (signal_name, "NewOverlayIcon") == 0 || |
975 | 987 | g_strcmp0 (signal_name, "NewToolTip") == 0 || |
1077 | 1089 | |
1078 | 1090 | static void |
1079 | 1091 | assign_sortable_name (SnItem *item, |
1080 | const gchar *title) | |
1092 | const gchar *id) | |
1081 | 1093 | { |
1082 | 1094 | gchar *init_name, *normalized; |
1083 | 1095 | gchar *sortable_name, *old_sortable_name; |
1084 | 1096 | |
1085 | init_name = sn_item_interface_dup_id (SN_ITEM_INTERFACE (item->sn_item_proxy)); | |
1086 | ||
1087 | if (init_name == NULL && title != NULL) | |
1088 | { | |
1089 | init_name = g_strdup (title); | |
1097 | if (id != NULL) | |
1098 | { | |
1099 | init_name = g_strdup (id); | |
1090 | 1100 | } |
1091 | 1101 | else |
1092 | 1102 | { |