Improved icons

This commit is contained in:
Markus Koch 2017-02-05 14:47:45 +01:00
parent 538b2c54d9
commit 2b81a67087
2 changed files with 12 additions and 5 deletions

View File

@ -185,7 +185,6 @@
<property name="can_focus">True</property> <property name="can_focus">True</property>
<property name="max_length">10</property> <property name="max_length">10</property>
<property name="width_chars">10</property> <property name="width_chars">10</property>
<property name="secondary_icon_stock">gtk-clear</property>
<property name="secondary_icon_tooltip_text" translatable="yes">fg</property> <property name="secondary_icon_tooltip_text" translatable="yes">fg</property>
</object> </object>
<packing> <packing>
@ -212,7 +211,6 @@
<property name="can_focus">True</property> <property name="can_focus">True</property>
<property name="max_length">10</property> <property name="max_length">10</property>
<property name="width_chars">10</property> <property name="width_chars">10</property>
<property name="secondary_icon_stock">gtk-clear</property>
</object> </object>
<packing> <packing>
<property name="expand">True</property> <property name="expand">True</property>
@ -415,11 +413,10 @@
</packing> </packing>
</child> </child>
<child> <child>
<object class="GtkArrow"> <object class="GtkImage">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can_focus">False</property> <property name="can_focus">False</property>
<property name="arrow_type">down</property> <property name="icon_name">pan-down-symbolic</property>
<property name="shadow_type">in</property>
</object> </object>
<packing> <packing>
<property name="expand">False</property> <property name="expand">False</property>

View File

@ -443,6 +443,9 @@ void mainWindow_filterChanged(GtkWidget *widget, gpointer user_data)
mainWindow->filterSettings.time_start = g_date_time_to_unix(datetime); mainWindow->filterSettings.time_start = g_date_time_to_unix(datetime);
g_date_time_unref(datetime); g_date_time_unref(datetime);
} }
gtk_entry_set_icon_from_icon_name(GTK_ENTRY(widget ? widget : mainWindow->dateStart),
GTK_ENTRY_ICON_SECONDARY, "edit-clear-symbolic");
} }
if (!widget || widget == mainWindow->dateEnd) { if (!widget || widget == mainWindow->dateEnd) {
datetime = mdiary_get_date_from_string((gchar *)gtk_entry_get_text( datetime = mdiary_get_date_from_string((gchar *)gtk_entry_get_text(
@ -451,6 +454,9 @@ void mainWindow_filterChanged(GtkWidget *widget, gpointer user_data)
mainWindow->filterSettings.time_end = g_date_time_to_unix(datetime); mainWindow->filterSettings.time_end = g_date_time_to_unix(datetime);
g_date_time_unref(datetime); g_date_time_unref(datetime);
} }
gtk_entry_set_icon_from_icon_name(GTK_ENTRY(widget ? widget : mainWindow->dateStart),
GTK_ENTRY_ICON_SECONDARY, "edit-clear-symbolic");
} }
mainWindow->filterSettings.search_title = gtk_toggle_button_get_active( mainWindow->filterSettings.search_title = gtk_toggle_button_get_active(
@ -511,6 +517,8 @@ void mainWindow_clearSearch(GtkWidget *widget, gpointer user_data)
gtk_entry_set_text(GTK_ENTRY(mainWindow->dateStart), temp); gtk_entry_set_text(GTK_ENTRY(mainWindow->dateStart), temp);
g_date_time_unref(datetime); g_date_time_unref(datetime);
g_free(temp); g_free(temp);
gtk_entry_set_icon_from_icon_name(GTK_ENTRY(widget ? widget : mainWindow->dateStart),
GTK_ENTRY_ICON_SECONDARY, "");
} }
if (!widget || widget == mainWindow->dateEnd) { if (!widget || widget == mainWindow->dateEnd) {
@ -519,6 +527,8 @@ void mainWindow_clearSearch(GtkWidget *widget, gpointer user_data)
gtk_entry_set_text(GTK_ENTRY(mainWindow->dateEnd), temp); gtk_entry_set_text(GTK_ENTRY(mainWindow->dateEnd), temp);
g_date_time_unref(datetime); g_date_time_unref(datetime);
g_free(temp); g_free(temp);
gtk_entry_set_icon_from_icon_name(GTK_ENTRY(widget ? widget : mainWindow->dateEnd),
GTK_ENTRY_ICON_SECONDARY, "");
} }
} }