summaryrefslogtreecommitdiff
path: root/src/gdict-app.c
Commit message (Collapse)AuthorAgeFilesLines
* app: Remove various unused variablesJuan R. Garcia Blanco2016-01-241-1/+0
|
* Use GTK's automagic menu loadingEmmanuele Bassi2016-01-141-9/+1
| | | | | | Instead of loading the application and the menu button popup ourselves we should reuse the support in GTK+ for automatically loading menus. This simplifies our code base.
* app: Add a missing includeEmmanuele Bassi2015-09-211-0/+1
| | | | | We're using gdict_show_about_dialog(), so we need to include the header that declares it.
* app: Use widget templates and a header barJuan R. García Blanco2015-04-041-2/+0
| | | | | | Migrate to current GNOME applications style: use a template widget for GdictWindow, add a header bar and a menu button. See https://bugzilla.gnome.org/show_bug.cgi?id=334866
* app: Move New Window to app menuJuan R. García Blanco2015-04-041-0/+16
| | | | | New Window action now opens a clean Dictionary window. See https://bugzilla.gnome.org/show_bug.cgi?id=334866
* Pass the application pointer to the window constructorEmmanuele Bassi2015-04-031-4/+4
| | | | We don't need to set the application ourselves.
* app: Drop homegrown app singletonEmmanuele Bassi2015-04-031-75/+49
| | | | | We can drop a bunch of indirection just by making our GdictApp class a subclass of GtkApplication.
* src: Rename the menus UI definition fileEmmanuele Bassi2015-03-301-1/+1
| | | | Follow the `gdict-` naming scheme.
* app: Implement GApplication::activateEmmanuele Bassi2015-03-071-9/+15
| | | | | | | | If we launch the Dictionary via DBus activation, we'll get an error because we don't implement/override the activate signal. There was a stub which tricked `git grep`, but gnome-continuous found the issue.
* Move UI definitions to GResourceEmmanuele Bassi2015-03-011-9/+1
| | | | | | | We still install the UI definitions on the file system, and then we load them every time it's needed. The current best practice for this kind of files is to use the GResource API inside GIO, and have them compiled inside the binary. This helps with performance and relocatability.
* app: Drop all deprecated APIEmmanuele Bassi2015-02-231-8/+6
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=745022
* Convert to new-style commandline option handlingMatthias Clasen2014-11-211-41/+60
| | | | | | | This avoids manual parsing of options, and adds support for --gapplication-service. https://bugzilla.gnome.org/show_bug.cgi?id=728302
* Fixed FSF address in several files. Fixes bug #666702Antono Vasiljev2012-11-111-3/+1
|
* Use yelp-tools insted of gnome-doc-utilsOliver Propst2012-08-221-1/+1
| | | | Signed-off-by: Javier Jardón <jjardon@gnome.org>
* app: Add a minimal application menuFlorian Müllner2012-05-101-0/+83
| | | | | | | | | | | While Dictionary is a rather small application which probably could do well with only an application menu and no menubar, this would require a couple of design changes, as almost all actions currently in the menus are window-specific. So for now, leave the menubar alone and only add a minimal application menu. https://bugzilla.gnome.org/show_bug.cgi?id=674939
* window: Port to GMenuFlorian Müllner2012-05-101-0/+29
| | | | | | | Menus using GtkUIManager/GtkAction should be phased out now in favor of GMenu. Port to the new API, but don't change any UI just yet ... https://bugzilla.gnome.org/show_bug.cgi?id=674939
* Use XDG directory layout for configAntono Vasiljev2012-02-231-1/+6
| | | | | | | - implemented gdict_get_config_dir - implemented gdict_migrate_configs - some whitespace cleanup (mixed tabs and spaces -> spaces)
* dictionary: Port to GtkApplicationEmmanuele Bassi2011-01-291-326/+125
| | | | | | | | Use the newly added GApplication and GtkApplication classes, provided by GIO and GTK+ respectively, to handle the lifetime of the Dictionary. This makes the Dictionary a single instance application; new windows are created on demand by the running process.
* dictionary: Port to GSettingsEmmanuele Bassi2011-01-291-15/+3
| | | | | | | | | | | | Drop the GConf dependency for the main application, and use the new GSettings API from GIO. This requires some bumping around of dependencies, like GLib and GIO, to something relatively recent. The Dictionary window state is not stored in GSettings, but in a cache file in XDG_CACHE_DIR/XDG_USER_CACHE, since it's something that we don't need changes notification on, nor we particularly rely upon.
* Some more fixes for building with -DGSEAL_ENABLEAndre Klapper2010-05-031-2/+2
|
* Bug 454691 – Messages in the gnome-dictionary --help output are not allEmmanuele Bassi2008-12-191-16/+10
| | | | | | | | | | | | | | | 2008-12-19 Emmanuele Bassi <ebassi@gnome.org> Bug 454691 – Messages in the gnome-dictionary --help output are not all translated * libgdict/gdict-utils.c: Mark debug command line options as translatable. * src/gdict-app.c (gdict_init): Fix translation of the command line options. (Gabor Kelemen) svn path=/trunk/; revision=8210
* Use single GTK+ includes. Patch by Maxim Ermilov (#561257).Cosimo Cecchi2008-12-031-1/+1
| | | | svn path=/trunk/; revision=8200
* Bug #557562, drop libgnome/libgnomeui dependency.Cosimo Cecchi2008-11-041-33/+13
| | | | svn path=/trunk/; revision=8172
* Remove useless gnome-print headersEmmanuele Bassi2007-09-061-5/+0
| | | | | | | Dictionary does not depend on libgnomeprint and libgnomeprintui anymore, so we don't need to include the gnome-print headers. svn path=/trunk/; revision=7680
* Enable the GDict command line switches in DictionaryEmmanuele Bassi2007-09-061-0/+1
| | | | svn path=/trunk/; revision=7662
* Use the gnome-icon-theme icon for the dictionary instead of our own.Emmanuele Bassi2007-08-281-1/+1
| | | | | | | | | | | | | 2007-08-28 Emmanuele Bassi <ebassi@gnome.org> * src/gdict-about.c: * src/gdict-app.c: * src/gdict-applet.c: * data/gnome-dictionary.desktop.in.in: * data/Makefile.am: Use the gnome-icon-theme icon for the dictionary instead of our own. (#470287, Michael Monreal) svn path=/trunk/; revision=7603
* Use G_OPTION_REMAINING to catch every word used on the command line andEmmanuele Bassi2006-07-281-3/+28
| | | | | | | | | | | | | | | | | 2007-07-28 Emmanuele Bassi <ebassi@cvs.gnome.org> * src/gdict-app.c (gdict_init): Use G_OPTION_REMAINING to catch every word used on the command line and look up them (#335886). (gdict_create_window): Create a window for every request for match * src/gdict-app.c: * src/gdict-window.h: * src/gdict-window.c: Add an "action" property for the GdictWindow widget: use this property to set the initial state and action to perform.
* Use the ENABLE_DEBUG conditional to turn on debug messages at compileEmmanuele Bassi2006-07-201-4/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2006-07-21 Emmanuele Bassi <ebassi@cvs.gnome.org> * libgdict/Makefile.am: Use the ENABLE_DEBUG conditional to turn on debug messages at compile time. Should really make everything work at runtime too, some day. * src/gdict-applet.c (window_key_press_event): Ctrl+L should return focus to the word entry. (gdict_applet_toggle_window): Shift focus when showing the definition window. (gdict_applet_lookup_end_cb), (gdict_applet_error_cb): Resize the definition window when the look up ends, for good or evil. (#346893, reported by Matthias Clasen et al.) (gdict_applet_init): Use the new gdict_get_data_dir() function. * gdict-common.h: * gdict-common.c: Add gdict_get_data_dir() to factor out the data dir path build code. * gdict-source-dialog.c: (transport_combo_changed_cb), (update_dialog_ui), (build_new_source), (gdict_source_dialog_init): Use the index of the transport combo box instead of the string.
* A src/gdict-common.h A src/gdict-common.cEmmanuele Bassi2006-06-111-125/+46
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2006-06-11 Emmanuele Bassi <ebassi@cvs.gnome.org> A src/gdict-common.h A src/gdict-common.c * src/Makefile.am: * src/gdict-common.h: * src/gdict-common.c: Refactor out some functions common to the application and applet. * src/gdict-about.c: Use the installed themed icon for the dictionary logo. * src/gdict-app.h: * src/gdict-app.c: Use the installed themed icon for the dictionary window icon; add stub code for a --match command line switch; * src/gdict-pref-dialog.h: * src/gdict-pref-dialog.c: Hide the dialog on close; bind it to the parent widget; mimic the gdict_show_about_dialog() and gdict_show_source_dialog() functions; add the speller-visible GConf key. * src/gdict-applet.h: * src/gdict-applet.c: Use the installed themed icon for the dictionary window icon. * src/gdict-window.h: * src/gdict-window.c: Miscellaneous fixes; add support for a GdictSpeller widget.
* Do not free the OptionContext: it'll be done by the GnomeProgram when it'sEmmanuele Bassi2006-04-171-2/+0
| | | | | | | 2006-04-17 Emmanuele Bassi <ebassi@cvs.gnome.org> * src/gdict-app.c: Do not free the OptionContext: it'll be done by the GnomeProgram when it's unref'ed.
* Use g_option_context_set_main_group() to show the application's optionsEmmanuele Bassi2006-04-011-1/+1
| | | | | | | | 2006-04-01 Emmanuele Bassi <ebassi@cvs.gnome.org> * src/gdict-app.c: Use g_option_context_set_main_group() to show the application's options using the --help command line switch (closes #335730).
* Unref the GnomeProgram object to avoid leakage (closes bug #335745).Emmanuele Bassi2006-04-011-0/+3
| | | | | | | 2006-04-01 Emmanuele Bassi <ebassi@cvs.gnome.org> * src/gdict-app.c (gdict_app_finalize): Unref the GnomeProgram object to avoid leakage (closes bug #335745).
* remove the big frickin' dialog, and just rename the file that's causingEmmanuele Bassi2006-02-241-99/+33
| | | | | | | | | 2006-02-24 Emmanuele Bassi <ebassi@cvs.gnome.org> * src/gdict-app.c (gdict_app_create_data_dir): remove the big frickin' dialog, and just rename the file that's causing the error by appending the '.pre-2-14' string to its name. Let's hope this is enough.
* ask the user what to do if a file with the same name of the dictionaryEmmanuele Bassi2006-02-241-37/+170
| | | | | | | | | | | | 2006-02-24 Emmanuele Bassi <ebassi@cvs.gnome.org> * src/gdict-app.c (gdict_app_init), (gdict_app_create_data_dir), (gdict_init): ask the user what to do if a file with the same name of the dictionary data dir is found; the file usually is a remnant of the time when the old dictionary used bonobo, and it hasn't been used in a while. the user has the option to remove the file, make a backup copy of it, or quit dictionary and manually handle the name clash (closes bug #331031).
* src/gdict-app.h support looking up multiple words from the console usingEmmanuele Bassi2006-02-051-46/+98
| | | | | | | | | | | | | | | | | 2006-02-05 Emmanuele Bassi <ebassi@cvs.gnome.org> * src/gdict-app.h * src/gdict-app.c (gdict_app_finalize), (gdict_window_created_cb), (lookup_start_cb), (definition_found_cb), (lookup_end_cb), (gdict_look_up_word_and_quit), (gdict_init): support looking up multiple words from the console using the --look-up <word> command line switch more than once; this also works with the --no-window switch, for console-only output. * src/gdict-window.c (gdict_window_new): fill the look up entry if a word is passed to the GdictWindow constructor. * src/gdict-about.c: update copyright date.
* remove callback to the "die" signal (closes bug #329911).Emmanuele Bassi2006-02-051-3/+0
| | | | | | | 2006-02-05 Emmanuele Bassi <ebassi@cvs.gnome.org> * src/gdict-app.c (gdict_app_init): remove callback to the "die" signal (closes bug #329911).
* check whether there is a file with the same name of the data directoryEmmanuele Bassi2006-02-041-3/+24
| | | | | | | | | | | | 2006-02-04 Emmanuele Bassi <ebassi@cvs.gnome.org> * src/gdict-app.c (gdict_app_init): check whether there is a file with the same name of the data directory under $HOME/.gnome2, and warn the user to move it away; the file seems to be a left-over from older versions of Gnome (early 2.0, probably), so it shouldn't bother us that much (closes bug #329126). * src/gdict-applet.c (gdict_applet_init): ditto.
* fix error reporting.Emmanuele Bassi2006-01-221-1/+3
| | | | | | | 2006-01-22 Emmanuele Bassi <ebassi@cvs.gnome.org> * src/gdict-applet.c (gdict_applet_init): * src/gdict-app.c (gdict_app_init): fix error reporting.
* enable look up via command-line (closes bug #325014).Emmanuele Bassi2006-01-021-6/+105
| | | | | | | | 2005-01-02 Emmanuele Bassi <ebassi@cvs.gnome.org> * src/gdict-app.h: * src/gdict-app.c: enable look up via command-line (closes bug #325014).
* Set execute bit (0700). Set execute bit (0700). UI fix for remove sourceEmmanuele Bassi2006-01-021-1/+1
| | | | | | | | | | 2005-01-02 Emmanuele Bassi <ebassi@cvs.gnome.org> * src/gdict-app.c: (gdict_app_init): Set execute bit (0700). * src/gdict-applet.c: (gdict_applet_init): Set execute bit (0700). * src/gdict-pref-dialog.c: (source_remove_clicked_cb): UI fix for remove source confirmation dialog (patch by Dennis Cranston, fixes bug #325455).
* Re-sync with my development trunk: add the new source dialog code; fix aEmmanuele Bassi2005-12-301-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2005-12-30 Emmanuele Bassi <ebassi@cvs.gnome.org> Re-sync with my development trunk: add the new source dialog code; fix a slew of typos and a serious crasher; more UI fixes. A data/gnome-dictionary.png A src/gdict-source-dialog.h A src/gdict-source-dialog.c * libgdict/gdict-entry.c, src/gdict-pref-dialog.c, src/gdict-about.c, src/gdict-app.c, src/gdict-applet.c: fix some typos. * src/gdict-window.c (gdict_window_class_init): we don't need translatable properties, here. * src/Makefile.am: add gdict-source-dialog.[ch] to the build. * src/gdict-pref-dialog.c, src/gdict-source-dialog.h, src/gdict-source-dialog.c: move out the source dialog into its own file; make it flexible enough to allow further expansion when sources view and editing will be added. * src/gdict-about.c: add support for the new icon. * libgdict/gdict-context.c: add documentation * data/gnome-dictionary.1: update the man page. * data/gnome-dictionary-preferences.glade: update the UI for the source dialog. * src/gdict-about.c, src/gdict-app.c, src/gdict-applet.c, src/gdict-window.c, src/gdict-window.h: add support for the new icon. * data/gnome-dictionary.desktop.in: add the new icon * data/gnome-dictionary.png: new icon for the dictionary. * data/Makefile.am: add the appicon target * libgdict/gdict-defbox.c (create_progress_dialog): UI fixes (patch from Dennis Cranston, closes bug #324860). * src/gdict-window.c (gdict_window_lookup_start_cb), (gdict_window_lookup_end_cb), (entry_activate_cb), (gdict_window_drag_data_received_cb): Fix a couple regressions: 1) change window title format to "word - App Name" per HIG. 2) display a busy cursor while looking up words (patch from Dennis Cranston, closes bug #324860). * src/gdict-window.c (gdict_window_error_cb), (gdict_window_set_word), (entry_activate_cb), (gdict_window_drag_data_received_cb): fix a double-free bug triggered by a failed look up (patch from Paolo Borelli, closes bug #325238).
* The "Maybe this Christmas" release. This release marks the end of the bigEmmanuele Bassi2005-12-241-0/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2005-12-25 Emmanuele Bassi <ebassi@cvs.gnome.org> The "Maybe this Christmas" release. This release marks the end of the big UI and feature changes: from now on, it's fixes time until the next development cycle. Merry Christmas everyone. * src/gdict-print.c: fix compiler warnings about parameter signedness. * data/gnome-dictionary-preferences.glade: update the source add dialog with a new UI. * docs/reference/gdict/gdict-decl-list.txt: add gdict_defbox_set_database() and gdict_defbox_get_database() to the declarations list. * src/gdict-about.c: use "Look up". * src/gdict-app.c (gdict_app_init): create the data directory inside $HOME/.gnome2 when creating the application singleton. * src/gdict-applet.c (gdict_applet_init): ditto. * src/gdict-pref-dialog.c: add the source add dialog, and enable the source remove code: now the user can create new dictionary sources without having to actually drop a file inside the data directory. The code is still a bit flaky, but this closes all the UI/feature work for the release. * src/gdict-window.c (gdict_window_cmd_help_contents): fix error message.
* fix a bunch of compiler warnings (patch by Kjartan Maraas, closes bugEmmanuele Bassi2005-12-211-8/+4
| | | | | | | | | | | | | | | | | | | | | | | | 2005-12-21 Emmanuele Bassi <ebassi@cvs.gnome.org> * src/gdict-window.c: fix a bunch of compiler warnings (patch by Kjartan Maraas, closes bug #324552). * src/gtkalignedwindow.c (gtk_aligned_window_finalize), (gdict_aligned_window_get_widget): ditto. * src/main.c: include libintl.h. * src/gdict-applet.c (gdict_applet_init), (gdict_applet_gconf_notify_cb): hook up the notification callback and monitor the database and strategy keys. * src/gdict-app.c (gdict_window_destroy_cb), (gdict_init), (gdict_main): fix compiler warnings (patch by Kjartan Maraas, closes bug #324552). * src/gdict-about.c: use "Look up" instead of "Lookup". * README: remove the warnings.
* A bunch UI fixes from Dennis Cranston, and a bunch of fixes triggered by aEmmanuele Bassi2005-12-171-27/+86
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2005-12-17 Emmanuele Bassi <ebassi@cvs.gnome.org> A bunch UI fixes from Dennis Cranston, and a bunch of fixes triggered by a down of dict.org. * libgdict/gdict-defbox.c, src/gdict-window.c: fix lifetime of the GdictContext and related signal handlers. * libgdict/gdict-client-context.c (gdict_client_context_finalize), (clear_command_queue): fix a double free bug issued when finalizing a ClientContext with a non-empty queue (patch by Paolo Borelli). * libgdict/gdict-client-context.c: emit "error" when unable to connect to the dictionary server. * libgdict/gdict-defbox.c: UI fixes for the find widgets (patch by Dennis Cranston). * src/gdict-window.c: UI fixes. Fix widget spacing. Change "find" back to "look up" to avoid confusion caused by its double use (patch by Dennis Cranston). * libgdict/gdict-source.c: fix the "context" propery; * src/gdict-window.c: add "source-name" and "word" constructor properties, so that a window might be created with a pre-defined source and word to look up. * libgdict/gdict-app.c (gdict_create_window), (gdict_window_created_cb), (gdict_window_destroy_cb): fix multiple registration of callbacks and remove the loop on the windows list for good (based on a patch by Paolo Borelli). * src/gdict-app.c: begin command line arguments support, and attach a GOptionContext to gnome_program_init().
* Adding gnome-dictionary/srcEmmanuele Bassi2005-12-161-0/+252