Top | ![]() |
![]() |
![]() |
![]() |
GWeatherLocation * | location | Read / Write |
gboolean | show-named-timezones | Read / Write / Construct Only |
GWeatherLocation * | top | Write / Construct Only |
GObject ╰── GInitiallyUnowned ╰── GtkWidget ╰── GtkEntry ╰── GtkSearchEntry ╰── GWeatherLocationEntry
GWeatherLocationEntry implements AtkImplementorIface, GtkBuildable, GtkEditable and GtkCellEditable.
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.
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
.
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.
the selected location
(which you must unref when you are done with it), or NULL
if no
location is selected.
[transfer full][allow-none]
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.
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
.
“location”
property“location” GWeatherLocation *
The selected GWeatherLocation.
Owner: GWeatherLocationEntry
Flags: Read / Write
“show-named-timezones”
property“show-named-timezones” gboolean
Whether UTC and other named timezones are shown in the list of locations.
Owner: GWeatherLocationEntry
Flags: Read / Write / Construct Only
Default value: FALSE
“top”
property“top” GWeatherLocation *
The GWeatherLocation whose children will be used to fill in the entry.
Owner: GWeatherLocationEntry
Flags: Write / Construct Only