Lines 768-781
add_emblem_paths(GHashTable* emblem_paths_response)
Link Here
|
768 |
|
768 |
|
769 |
gchar **emblem_paths_list; |
769 |
gchar **emblem_paths_list; |
770 |
int i; |
770 |
int i; |
771 |
|
771 |
GtkIconTheme *theme = gtk_icon_theme_get_for_display (gdk_display_get_default ()); |
772 |
GtkIconTheme *theme = gtk_icon_theme_get_default(); |
|
|
773 |
|
772 |
|
774 |
if (emblem_paths_response && |
773 |
if (emblem_paths_response && |
775 |
(emblem_paths_list = g_hash_table_lookup(emblem_paths_response, "path"))) { |
774 |
(emblem_paths_list = g_hash_table_lookup(emblem_paths_response, "path"))) { |
776 |
for (i = 0; emblem_paths_list[i] != NULL; i++) { |
775 |
for (i = 0; emblem_paths_list[i] != NULL; i++) { |
777 |
if (emblem_paths_list[i][0]) |
776 |
if (emblem_paths_list[i][0]) |
778 |
gtk_icon_theme_append_search_path(theme, emblem_paths_list[i]); |
777 |
gtk_icon_theme_add_search_path(theme, emblem_paths_list[i]); |
779 |
} |
778 |
} |
780 |
} |
779 |
} |
781 |
g_hash_table_unref(emblem_paths_response); |
780 |
g_hash_table_unref(emblem_paths_response); |
Lines 794-808
remove_emblem_paths(GHashTable* emblem_paths_response)
Link Here
|
794 |
goto exit; |
793 |
goto exit; |
795 |
|
794 |
|
796 |
// We need to remove the old paths. |
795 |
// We need to remove the old paths. |
797 |
GtkIconTheme * icon_theme = gtk_icon_theme_get_default(); |
|
|
798 |
gchar ** paths; |
796 |
gchar ** paths; |
799 |
gint path_count; |
797 |
GtkIconTheme *theme = gtk_icon_theme_get_for_display (gdk_display_get_default ()); |
800 |
|
798 |
|
801 |
gtk_icon_theme_get_search_path(icon_theme, &paths, &path_count); |
799 |
paths = gtk_icon_theme_get_search_path(theme); |
802 |
|
800 |
|
803 |
gint i, j, out = 0; |
801 |
gint i, j, out = 0; |
804 |
gboolean found = FALSE; |
802 |
gboolean found = FALSE; |
805 |
for (i = 0; i < path_count; i++) { |
803 |
for (i = 0; paths[i] != NULL; i++) { |
806 |
gboolean keep = TRUE; |
804 |
gboolean keep = TRUE; |
807 |
for (j = 0; emblem_paths_list[j] != NULL; j++) { |
805 |
for (j = 0; emblem_paths_list[j] != NULL; j++) { |
808 |
if (emblem_paths_list[j][0]) { |
806 |
if (emblem_paths_list[j][0]) { |
Lines 824-830
remove_emblem_paths(GHashTable* emblem_paths_response)
Link Here
|
824 |
accomodate the changes */ |
822 |
accomodate the changes */ |
825 |
if (found) { |
823 |
if (found) { |
826 |
paths[out] = NULL; /* Clear the last one */ |
824 |
paths[out] = NULL; /* Clear the last one */ |
827 |
gtk_icon_theme_set_search_path(icon_theme, (const gchar **)paths, out); |
825 |
gtk_icon_theme_set_search_path(theme, (const gchar **)paths); |
828 |
} |
826 |
} |
829 |
|
827 |
|
830 |
g_strfreev(paths); |
828 |
g_strfreev(paths); |
831 |
-- |
|
|
832 |
dropbox.in | 3 --- |
829 |
dropbox.in | 3 --- |
833 |
1 file changed, 3 deletions(-) |
830 |
1 file changed, 3 deletions(-) |
834 |
mode change 100755 => 100644 dropbox.in |
831 |
mode change 100755 => 100644 dropbox.in |