| Top |
Object Hierarchy
GObject ╰── GInitiallyUnowned ╰── GtkWidget ╰── GtkEntry ╰── GtkSearchEntry ╰── GWeatherLocationEntry
Implemented Interfaces
GWeatherLocationEntry implements AtkImplementorIface, GtkBuildable, GtkEditable and GtkCellEditable.
Functions
gweather_location_entry_new ()
GtkWidget *
gweather_location_entry_new (GWeatherLocation *top);
Creates a new GWeatherLocationEntry.
top
will normally be the location returned from
gweather_location_get_world(), but you can create an entry that
only accepts a smaller set of locations if you want.
gweather_location_entry_set_location ()
void gweather_location_entry_set_location (GWeatherLocationEntry *entry,GWeatherLocation *loc);
Sets entry
's location to loc
, and updates the text of the
entry accordingly.
Note that if the database contains a location that compares
equal to loc
, that will be chosen in place of loc
.
gweather_location_entry_get_location ()
GWeatherLocation *
gweather_location_entry_get_location (GWeatherLocationEntry *entry);
Gets the location that was set by a previous call to
gweather_location_entry_set_location() or was selected by the user.
Returns
the selected location
(which you must unref when you are done with it), or NULL if no
location is selected.
[transfer full][allow-none]
gweather_location_entry_has_custom_text ()
gboolean
gweather_location_entry_has_custom_text
(GWeatherLocationEntry *entry);
Checks whether or not entry
's text has been modified by the user.
Note that this does not mean that no location is associated with entry
.
gweather_location_entry_get_location() should be used for this.
gweather_location_entry_set_city ()
gboolean gweather_location_entry_set_city (GWeatherLocationEntry *entry,const char *city_name,const char *code);
Sets entry
's location to a city with the given code
, and given
city_name
, if non-NULL. If there is no matching city, sets
entry
's location to NULL.
Property Details
The “location” property
“location” GWeatherLocation *
The selected GWeatherLocation.
Flags: Read / Write
The “top” property
“top” GWeatherLocation *
The GWeatherLocation whose children will be used to fill in the entry.
Flags: Write / Construct Only
