diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/app.c | 1 | ||||
-rw-r--r-- | src/ui/documentwidget.c | 17 | ||||
-rw-r--r-- | src/ui/sidebarwidget.c | 13 | ||||
-rw-r--r-- | src/ui/window.c | 10 |
4 files changed, 27 insertions, 14 deletions
@@ -593,6 +593,7 @@ static iBool handleIdentityCreationCommands_(iWidget *dlg, const char *cmd) { | |||
593 | /* The input seems fine. */ | 593 | /* The input seems fine. */ |
594 | newIdentity_GmCerts(d->certs, isTemp ? temporary_GmIdentityFlag : 0, | 594 | newIdentity_GmCerts(d->certs, isTemp ? temporary_GmIdentityFlag : 0, |
595 | until, commonName, userId, organization, country); | 595 | until, commonName, userId, organization, country); |
596 | postCommandf_App("sidebar.mode arg:%d show:1", identities_SidebarMode); | ||
596 | postCommand_App("idents.changed"); | 597 | postCommand_App("idents.changed"); |
597 | } | 598 | } |
598 | destroy_Widget(dlg); | 599 | destroy_Widget(dlg); |
diff --git a/src/ui/documentwidget.c b/src/ui/documentwidget.c index 8f31c690..8885bb9b 100644 --- a/src/ui/documentwidget.c +++ b/src/ui/documentwidget.c | |||
@@ -340,11 +340,12 @@ static int scrollMax_DocumentWidget_(const iDocumentWidget *d) { | |||
340 | } | 340 | } |
341 | 341 | ||
342 | static void updateHover_DocumentWidget_(iDocumentWidget *d, iInt2 mouse) { | 342 | static void updateHover_DocumentWidget_(iDocumentWidget *d, iInt2 mouse) { |
343 | const iRect docBounds = documentBounds_DocumentWidget_(d); | 343 | const iWidget *w = constAs_Widget(d); |
344 | const iGmRun *oldHoverLink = d->hoverLink; | 344 | const iRect docBounds = documentBounds_DocumentWidget_(d); |
345 | d->hoverLink = NULL; | 345 | const iGmRun * oldHoverLink = d->hoverLink; |
346 | const iInt2 hoverPos = addY_I2(sub_I2(mouse, topLeft_Rect(docBounds)), d->scrollY); | 346 | d->hoverLink = NULL; |
347 | if (!d->noHoverWhileScrolling && | 347 | const iInt2 hoverPos = addY_I2(sub_I2(mouse, topLeft_Rect(docBounds)), d->scrollY); |
348 | if (isHover_Widget(w) && !d->noHoverWhileScrolling && | ||
348 | (d->state == ready_RequestState || d->state == receivedPartialResponse_RequestState)) { | 349 | (d->state == ready_RequestState || d->state == receivedPartialResponse_RequestState)) { |
349 | iConstForEach(PtrArray, i, &d->visibleLinks) { | 350 | iConstForEach(PtrArray, i, &d->visibleLinks) { |
350 | const iGmRun *run = i.ptr; | 351 | const iGmRun *run = i.ptr; |
@@ -357,11 +358,7 @@ static void updateHover_DocumentWidget_(iDocumentWidget *d, iInt2 mouse) { | |||
357 | if (d->hoverLink != oldHoverLink) { | 358 | if (d->hoverLink != oldHoverLink) { |
358 | refresh_Widget(as_Widget(d)); | 359 | refresh_Widget(as_Widget(d)); |
359 | } | 360 | } |
360 | if (!contains_Widget(constAs_Widget(d), mouse) || | 361 | if (isHover_Widget(w) && !contains_Widget(constAs_Widget(d->scroll), mouse)) { |
361 | contains_Widget(constAs_Widget(d->scroll), mouse)) { | ||
362 | // setCursor_Window(get_Window(), SDL_SYSTEM_CURSOR_ARROW); | ||
363 | } | ||
364 | else { | ||
365 | setCursor_Window(get_Window(), | 362 | setCursor_Window(get_Window(), |
366 | d->hoverLink ? SDL_SYSTEM_CURSOR_HAND : SDL_SYSTEM_CURSOR_IBEAM); | 363 | d->hoverLink ? SDL_SYSTEM_CURSOR_HAND : SDL_SYSTEM_CURSOR_IBEAM); |
367 | } | 364 | } |
diff --git a/src/ui/sidebarwidget.c b/src/ui/sidebarwidget.c index fed08f52..73bd1646 100644 --- a/src/ui/sidebarwidget.c +++ b/src/ui/sidebarwidget.c | |||
@@ -242,6 +242,19 @@ static void updateItems_SidebarWidget_(iSidebarWidget *d) { | |||
242 | } | 242 | } |
243 | /* menu: set icon, edit notes, view urls, reveal files, delete, activate on this page, | 243 | /* menu: set icon, edit notes, view urls, reveal files, delete, activate on this page, |
244 | * deactivate on this page, deactivate everywhere */ | 244 | * deactivate on this page, deactivate everywhere */ |
245 | const iMenuItem menuItems[] = { | ||
246 | { "Use on This Page", 0, 0, "ident.use arg:1" }, | ||
247 | { "Stop Using This Page", 0, 0, "ident.use arg:0" }, | ||
248 | { "Stop Using Everywhere", 0, 0, "ident.use arg:0 clear:1" }, | ||
249 | { "View Use URLs", 0, 0, "ident.showuse" }, | ||
250 | { "---", 0, 0, NULL }, | ||
251 | { "Edit Notes...", 0, 0, "ident.edit" }, | ||
252 | { "Pick Icon...", 0, 0, "ident.pickicon" }, | ||
253 | { "---", 0, 0, NULL }, | ||
254 | { "Reveal Files", 0, 0, "ident.reveal" }, | ||
255 | { uiTextCaution_ColorEscape "Delete Identity...", 0, 0, "ident.delete confirm:1" }, | ||
256 | }; | ||
257 | d->menu = makeMenu_Widget(as_Widget(d), menuItems, iElemCount(menuItems)); | ||
245 | break; | 258 | break; |
246 | } | 259 | } |
247 | default: | 260 | default: |
diff --git a/src/ui/window.c b/src/ui/window.c index 6291519a..82109c07 100644 --- a/src/ui/window.c +++ b/src/ui/window.c | |||
@@ -319,10 +319,12 @@ static void setupUserInterface_Window(iWindow *d) { | |||
319 | setId_Widget(as_Widget(url), "url"); | 319 | setId_Widget(as_Widget(url), "url"); |
320 | setTextCStr_InputWidget(url, "gemini://"); | 320 | setTextCStr_InputWidget(url, "gemini://"); |
321 | addChildFlags_Widget(navBar, iClob(url), expand_WidgetFlag); | 321 | addChildFlags_Widget(navBar, iClob(url), expand_WidgetFlag); |
322 | setId_Widget( | 322 | setId_Widget(addChild_Widget( |
323 | addChild_Widget(navBar, iClob(newIcon_LabelWidget(reloadCStr_, 0, 0, "navigate.reload"))), | 323 | navBar, iClob(newIcon_LabelWidget(reloadCStr_, 0, 0, "navigate.reload"))), |
324 | "reload"); | 324 | "reload"); |
325 | addChild_Widget(navBar, iClob(newIcon_LabelWidget("\U0001f3e0", 0, 0, "navigate.home"))); | 325 | addChild_Widget(navBar, |
326 | iClob(newIcon_LabelWidget( | ||
327 | "\U0001f3e0", SDLK_h, KMOD_PRIMARY | KMOD_SHIFT, "navigate.home"))); | ||
326 | #if !defined (iHaveNativeMenus) | 328 | #if !defined (iHaveNativeMenus) |
327 | iLabelWidget *navMenu = | 329 | iLabelWidget *navMenu = |
328 | makeMenuButton_LabelWidget("\U0001d362", navMenuItems, iElemCount(navMenuItems)); | 330 | makeMenuButton_LabelWidget("\U0001d362", navMenuItems, iElemCount(navMenuItems)); |